-
-
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
Update CSS Modules localIndetName #4192
Conversation
CI is failed because it doesn't correctly copy/use the development version of Also failing due to linting issues that already existed in the repo. |
Hi! What's the status on this one? This would help to push #4195 forward! |
As far as I am aware, it's ready to merge. |
I have one question about these changes. Why do we need such a long class names in production mode? If i am not mistaken, this will always generate classes like |
@sqal - Please read #3965 if you would like the history. This has been discussed and decided on and won't be changed. Because of gzip, the size difference even for large project is tiny. The benefits of the small file increase for targeting, testing, analytics, readability etc was decided to be worth it. Example data, for a project with 133 classNames
|
Does this need a rebase? Looks like there's unrelated lint issues. |
73e7588
to
b409ee1
Compare
Thanks @Timer ! |
No, thank you for getting this together! |
* upstream/next: (35 commits) Update envinfo and issue template (facebook#4375) Update sass-loader to 7.0.1 (facebook#4376) Support package distribution tags (facebook#4350) fix broken css module support in prod (facebook#4361) Bumped jest version to 22.4.1 (facebook#4362) bump babel 7 to beta 46 bump lint-staged to node 10 compatible version documentation: Added License to the README.md (facebook#4294) Bump `fsevents`. (facebook#4331) Fix typo in e2e-simple.sh comment (facebook#4323) Add Sass loader (facebook#4195) Fix some typos in README.md (facebook#4286) Added learnstorybook.com to Storybook links (facebook#4298) Document multiple build environments via `env-cmd` facebook#4071 (facebook#4117) Fixed link to CSS imports blog post Update CSS Modules localIndetName (facebook#4192) Enable loose mode for `class-properties` (facebook#4248) bump babel 7 beta (facebook#4253) Small typo fix facebook#4217 Changelog for 1.1.4 ...
* next: (35 commits) Update envinfo and issue template (facebook#4375) Update sass-loader to 7.0.1 (facebook#4376) Support package distribution tags (facebook#4350) fix broken css module support in prod (facebook#4361) Bumped jest version to 22.4.1 (facebook#4362) bump babel 7 to beta 46 bump lint-staged to node 10 compatible version documentation: Added License to the README.md (facebook#4294) Bump `fsevents`. (facebook#4331) Fix typo in e2e-simple.sh comment (facebook#4323) Add Sass loader (facebook#4195) Fix some typos in README.md (facebook#4286) Added learnstorybook.com to Storybook links (facebook#4298) Document multiple build environments via `env-cmd` facebook#4071 (facebook#4117) Fixed link to CSS imports blog post Update CSS Modules localIndetName (facebook#4192) Enable loose mode for `class-properties` (facebook#4248) bump babel 7 beta (facebook#4253) Small typo fix facebook#4217 Changelog for 1.1.4 ...
* Update CSS Modules localIndetName * Add missing file to package * Correct regex * plz plz plz
This PR updates the classname naming of CSS Modules as per the discussion in PR #3965.
Examples
MyFolder/MyComponent.module.css
and classMyClass
the output will beMyComponent.module_MyClass__[hash]
MyFolder/index.module.css
and classMyClass
the output will beMyFolder_MyClass__[hash]
The E2E tests have been updated, but I was unable to run them locally to ensure the tests were working correctly.
The results have been manually tested.