We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sideEffects
I'm using webpack with ESM. When importing styles.css it gets treeshaken-out. And styles are missing completely in output
Possible webpack bug: webpack/webpack#7094
importing styles.css just works
Link to a minimal repro: Bug reproduction https://stackblitz.com/edit/webpack-5-react-starter-zvm3dw?file=src%2Fapp.tsx,package.json
Patched version with "sideEffects": ["styles.css"] https://stackblitz.com/edit/webpack-5-react-starter-m3a2tr?file=src%2Fapp.tsx,package.json
"sideEffects": ["styles.css"]
Possible solution: Add package.json sideEffects for styles.css file
{ sideEffects: ["styles.css"] }
The text was updated successfully, but these errors were encountered:
fixed in 3.1.1, thanks for your PR
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug (actual behavior)
I'm using webpack with ESM. When importing styles.css it gets treeshaken-out.
And styles are missing completely in output
Possible webpack bug: webpack/webpack#7094
Expected behavior
importing styles.css just works
Reproduction
Link to a minimal repro:
Bug reproduction
https://stackblitz.com/edit/webpack-5-react-starter-zvm3dw?file=src%2Fapp.tsx,package.json
Patched version with
"sideEffects": ["styles.css"]
https://stackblitz.com/edit/webpack-5-react-starter-m3a2tr?file=src%2Fapp.tsx,package.json
Steps to reproduce
Additional information
Possible solution:
Add package.json sideEffects for styles.css file
{ sideEffects: ["styles.css"] }
The text was updated successfully, but these errors were encountered: