You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS mounting code is not yet backed by unit testing. This has been like this historically because of the injected variables projectId and cssMap.
Please select the type of project this would be for: [ ] Root Config [x] Micro-frontend/parcel
Describe the solution you'd like
Refactor singleMife-css.ts and multiMife-css.ts so projectId and cssMap are injected as parameters through an internal version of cssLifecycleFactory.
Details
The idea is to create "internal-only" modules that are complete and don't depend on replaced values from a Vite build process so they can be imported and unit-tested. In a nutshell:
Rename singleMife-css.ts and multiMife-css.ts to singleMifeImpl.ts and multiMifeImpl.ts.
Add the extra base, projectId and cssMap parameters to cssLifecycleFactory().
From cssLifecycleFactory(), distribute base, projectId and cssMap to wherever is needed.
Get rid of the module-level definitions of base, projectId and cssMap.
Create new files with the original names for singleMife and multiMife.
Place the original definitions of base, projectId and cssMap in these files or move to a common file and import.
From the new files, import the modified cssLifecycleFactory() function and export a modified version with base, projectId and cssMap pre-filled using bind().
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
CSS mounting code is not yet backed by unit testing. This has been like this historically because of the injected variables
projectId
andcssMap
.Please select the type of project this would be for: [ ] Root Config [x] Micro-frontend/parcel
Describe the solution you'd like
Refactor
singleMife-css.ts
andmultiMife-css.ts
soprojectId
andcssMap
are injected as parameters through an internal version of cssLifecycleFactory.Details
The idea is to create "internal-only" modules that are complete and don't depend on replaced values from a Vite build process so they can be imported and unit-tested. In a nutshell:
singleMife-css.ts
andmultiMife-css.ts
tosingleMifeImpl.ts
andmultiMifeImpl.ts
.base
,projectId
andcssMap
parameters tocssLifecycleFactory()
.cssLifecycleFactory()
, distributebase
,projectId
andcssMap
to wherever is needed.base
,projectId
andcssMap
.singleMife
andmultiMife
.base
,projectId
andcssMap
in these files or move to a common file and import.cssLifecycleFactory()
function and export a modified version withbase
,projectId
andcssMap
pre-filled usingbind()
.The text was updated successfully, but these errors were encountered: