-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Chunks are not split properly with experimentalUseImportModule #933
Comments
Hellom sorry for delay, can you try:
Because now we execute modules with CSS on Node.js side we lose context, anyway, context is not the good solution, some plugins and loaders can change them too, better to use |
Thanks, and sorry for delay on my side too! I tried this, and it does work fine in the sample repo I set up, but only because of the specific test being done. In our real case we were also testing for things around
While we could solve this in our case by having a regex that avoids the individual loaders, it would be preferable to not maintain a list of any loader names in there, especially since this fails silently and just results in less code splitting and larger bundles. I suppose we could also do
Thank you! 🙏 |
@vankop What do you think? We can change it on |
However, I didn't get why we loose context in case of |
As
On breakage here, does this refer to the people who used If we find it difficult to fix |
Let's wait @sokra answer |
Hi @sokra! 👋 I totally understand everyone is busy and I have no expectation of a speedy answer or support here for an OSS project, so see this as just a friendly reminder in case this was lost somewhere :) Thanks for all the great work! ❤️ |
Bug report
Chunks aren't split properly for CSS when using
mini-css-extract-plugin@>=2.4.0
(or older together withexperimentalUseImportModule: true
).This is mainly the same as #850 but that was closed.
Actual Behavior
Code gets folded into the main bundle.
Expected Behavior
Code gets split into the right chunks as specified in the config.
How Do We Reproduce?
Check out this repo with examples for when it's working, when it's not working, and a potential fix.
https://github.com/koggdal/sample-mini-css-extract-plugin-issue-850
Read the README in that repo for more details.
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: