Uh oh!
There was an error while loading. Please reload this page.
Update CSS Modules localIndetName - #4192
Conversation
ro-savage
commented
Mar 21, 2018
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. |
Fabianopb
commented
Apr 6, 2018
Hi! What's the status on this one? This would help to push #4195 forward! |
ro-savage
commented
Apr 6, 2018
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
|
gaearon
commented
Apr 13, 2018
Does this need a rebase? Looks like there's unrelated lint issues. |
73e7588 to
b409ee1Comparero-savage
commented
Apr 14, 2018
Thanks @Timer ! |
Timer
commented
Apr 15, 2018
No, thank you for getting this together! |
* upstream/next: (35 commits) Update envinfo and issue template (react#4375) Update sass-loader to 7.0.1 (react#4376) Support package distribution tags (react#4350) fix broken css module support in prod (react#4361) Bumped jest version to 22.4.1 (react#4362) bump babel 7 to beta 46 bump lint-staged to node 10 compatible version documentation: Added License to the README.md (react#4294) Bump `fsevents`. (react#4331) Fix typo in e2e-simple.sh comment (react#4323) Add Sass loader (react#4195) Fix some typos in README.md (react#4286) Added learnstorybook.com to Storybook links (react#4298) Document multiple build environments via `env-cmd` react#4071 (react#4117) Fixed link to CSS imports blog post Update CSS Modules localIndetName (react#4192) Enable loose mode for `class-properties` (react#4248) bump babel 7 beta (react#4253) Small typo fixreact#4217 Changelog for 1.1.4 ...
* next: (35 commits) Update envinfo and issue template (react#4375) Update sass-loader to 7.0.1 (react#4376) Support package distribution tags (react#4350) fix broken css module support in prod (react#4361) Bumped jest version to 22.4.1 (react#4362) bump babel 7 to beta 46 bump lint-staged to node 10 compatible version documentation: Added License to the README.md (react#4294) Bump `fsevents`. (react#4331) Fix typo in e2e-simple.sh comment (react#4323) Add Sass loader (react#4195) Fix some typos in README.md (react#4286) Added learnstorybook.com to Storybook links (react#4298) Document multiple build environments via `env-cmd` react#4071 (react#4117) Fixed link to CSS imports blog post Update CSS Modules localIndetName (react#4192) Enable loose mode for `class-properties` (react#4248) bump babel 7 beta (react#4253) Small typo fixreact#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.cssand classMyClassthe output will beMyComponent.module_MyClass__[hash]MyFolder/index.module.cssand classMyClassthe 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.