-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CSS Module dependencies are not transformed correctly #7919
Comments
I think I've identified the problem. It was reported that this bug was introduced in 3.1.0 #7596 (comment), so I was looking to see what changed in that release. In 914c95e#diff-dc0c4e7c623b73660da1809fc60cf6ba, an additional loader was introduced when a preprocessor was used. Unfortunately, |
Any news on this? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
still happening |
Fixed in #8281. Released in 3.3.1 |
Describe the bug
When using CSS modules, if you compose a class from a
.module.scss
file, the dependency (that is, the module you import to compose from) does not have its scss transformed correctly. While the compose will work correctly, and SCSS is not preprocessed away down to recular css.Did you try recovering your dependencies?
Yes. This is on a newly created test reproduction project.
Which terms did you search for in User Guide?
CSS Modules, SCSS, Sass, CSS
Environment
Steps to reproduce
(Write your steps here:)
npx create-react app
yarn add node-sass
common.module.scss
and write a class with some scss in it.common.module.scss
App.module.scss
and apply it to an elementyarn start
Expected behavior
common.module.scss
will have its styles in the<head>
of the page, and the scss variables would be preprocessed out to regular css.The element will have the correct styles applied to it from common.module.scss.
It should look like this:
Actual behavior
common.module.scss
will have its styles in the<head>
of the page, but the scss language features (such as variables) will still be present.The element will have the correct styles applied to it from common.module.scss.
It looks like this:
Reproducible demo
https://github.com/joshhunt/create-react-app-repro
Clone it,
yarn install
,yarn start
. The box should be pink, but it is not.The text was updated successfully, but these errors were encountered: