Skip to content

Commit

Permalink
feat: Remove the export from models/index
Browse files Browse the repository at this point in the history
In order to enhance the cozy-client tree shaking,
we should avoind importing * and exporting.

We had an issue with this PR
#1274

because this PR adds date-fns v2 as dep, but even
if the consuming app doesn't use the concerned model
it was imported.

BREAKING CHANGE: You can not use
import { models } from cozy-client
...
models.files.func()

You have to change it to:
import { func } from cozy-client/dist/models/files
  • Loading branch information
Crash-- committed Jan 11, 2023
1 parent 0c684fd commit 9fb19eb
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions packages/cozy-client/src/models/index.js

This file was deleted.

0 comments on commit 9fb19eb

Please sign in to comment.