-
-
Notifications
You must be signed in to change notification settings - Fork 384
Can't use exportLocalsOnly in css-loader #841
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
Comments
Please provide reproducible test repo |
@alexander-akait Sure thing. Here you go: https://github.com/Istanful/export-locals-only-mini-css-error |
Fixed - #844, note - you should avoid using |
Thanks! You're right, that makes sense. I did not quite think that through. :P I'm hoping to only use scoped classes and forbidding global selectors such as |
Bug report
When I configure mini-css-extract-plugin in conjunction with css-loader and
exportLocalsOnly
I encounter an error.Reproducible repo: https://github.com/Istanful/export-locals-only-mini-css-error
Actual Behavior
When I configure mini-css-extract-plugin in conjunction with css-loader and
exportLocalsOnly
I encounter an error.Expected Behavior
It should ignore that no default export exists and compile anyways.
How Do We Reproduce?
I create a webpack.config.js file. This is the relevant configuration.
When I then run
webpack serve
I get the following error:It happens here as it tries to check if locals is in the default export.
I wish to not have a default export as I want to only use CSS module locals.
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: