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
jest-preview couldn't process CSS Modules if users are using Create React App
Screenshots
Reproduce
Just init a CRA app and use CSS Modules
Root cause and solutions
Since jest-preview use postcss-modules to process CSS Modules, on the other hand, (I guess) CRA uses postcss-preset-env to process CSS Modules. There are a few solutions:
Leave it as-is. Document about this and ask users to install postcss-modules. Print some useful error message as well
Add postcss-modules as a dependency
Add postcss-modules as a peerDependency. (Remember to allow any version)
The text was updated successfully, but these errors were encountered:
Describe the bug
jest-preview
couldn't process CSS Modules if users are using Create React AppScreenshots
Reproduce
Just init a CRA app and use CSS Modules
Root cause and solutions
Since
jest-preview
usepostcss-modules
to process CSS Modules, on the other hand, (I guess) CRA usespostcss-preset-env
to process CSS Modules. There are a few solutions:postcss-modules
. Print some useful error message as wellpostcss-modules
as adependency
postcss-modules
as apeerDependency
. (Remember to allow any version)The text was updated successfully, but these errors were encountered: