-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICSS export not working in CRA 4 #10155
Comments
I confirmed the problem on [email protected] and [email protected] |
@justsolarry I've create a repository the share my investigations about this problem TD;LR; the problem seems to come from a regression introduce by css-loader@4. I will continue my research on this problem, and share here my progression. |
According to @alexander-akait response webpack-contrib/css-loader#1262 (comment) I will propose soon a PR to support |
Describe the bug
Exporting keys like this used to work in CRA 3 (react-scripts : 3.4.4) but when we upgraded to CRA 4 (react-scripts : 4.0.0) it stopped working.
After exporting, you can use it like this:
Did you try recovering your dependencies?
1.22.4
Which terms did you search for in User Guide?
export
ICSS
Environment
Environment Info:
current version of create-react-app: 3.4.1
running from /Users/you-haurliu/.config/yarn/global/node_modules/create-react-app
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Browsers:
Chrome: 87.0.4280.67
Firefox: 82.0
Safari: 14.0
npmPackages:
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-scripts: 3.4.4 => 3.4.4
npmGlobalPackages:
create-react-app: 1.5.2
Steps to reproduce
node-sass
as a dependency to allow forscss
filescolors.scss
in thesrc
foldercolors.scss
app.js
withimport colors from './colors.scss'
p
tagBut if you update
react-scripts
to4.0.0
and delete the node modules and yarn lock. Then yarn and start up the server, the text is white and thecolors
object is empty.Expected behavior
colors
object should containprimary
Actual behavior
colors
object is emptyReproducible demo
Instructions are included in the link
https://github.com/justsolarry/test-cra
The text was updated successfully, but these errors were encountered: