-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
CSS modules keeps the original className mapping #612
Comments
CSS Modules will be removed for 'css-loader The export const className = 'Ä3825t';
// ... CSS Modules
//... Custom Exports (from other postcss-plugins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this CSS modules setup with extract text plugin-
Section.css
Section.js
Current behavior
Currently,
css-loader
goes through the normal process of creating a module out of the import, and even storing the original name mapping. The resulting JS file looks similar tobuild.js (current)
Expected behaviour
Ideally, css loader should just inline the "hashed" classname wherever its being used.
One of the benefits of hashing classnames is reduction in file sizes in comparison with techniques such as BEM. But if the original mapping is stored, this purpose is defeated.
build.js (expected)
The text was updated successfully, but these errors were encountered: