Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
None
-
None
-
stripes-force 147
-
Stripes Force
-
TBD
Description
Overview: One or more components are imported directly from their root @folio/stripes-* packages, which are not directly imported into the bundle, instead of via the @folio/stripes wrapper package, which is so imported, e.g.
import { Button } from '@folio/stripes-components';
must be replaced withÂ
import { Button } from '@folio/stripes/components';
Note the - after stripes is converted to a /. Likewise, imports from SSC would use @folio/stripes/smart-components.
The current import strategy is technically incorrect since individual modules like @folio/stripes-components are not direct dependencies or peer-dependencies. Somehow yarn is not bothered and manages to provide webpack with what it needs to resolve the imports when creating the bundle. When creating the bundle with npm, however, this surfaces as an actual error and causes the job to fail. We anticipate migrating from yarn to npm within the next release or two, so while this is not urgent now, it will become so soon.
./src/views/AccountDetails/AccountDetails.js:import { IfPermission } from '@folio/stripes-core';
TestRail: Results
Attachments
Issue Links
- relates to
-
STRIPES-814 stripes-* components are incorrectly imported
-
- Closed
-