-
Notifications
You must be signed in to change notification settings - Fork 58
Looks like it doesn't get along with extract-css-chunks-webpack-plugin #41
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
So you are generating multiple CSS files and you expect for the rules of all the files to never intercept / repeat? That's a tricky one. This Is a bit complex.
|
First of all, thanks for amazing job here. You could find my comments below: EDITED: I've edited the answers.
|
Could you provide a simple code base example of your chunk configuration with webpack 4 and the expected result so i can get a full picture? Something that generates 2 or 3 CSS files (with few rules) where the files have common rules that should be de duplicated and a description of the intended result. |
Hi Nuno, I thought that probably it would be better to have separate plugin for such job and did a fork from your repo to be able to rewrite logic a bit. So, the new plugin works fine for me. It's not a replacement for your one, I'm using both at the same time. If you think optimize-css-assets-webpack-plugin should have this feature then feel free to incorporate the changes were done there. Thanks. |
Thanks. I still think its a cool feature to have on 'optimize-css-assets-webpack-plugin' behind a option flag. I will try to integrate it when i have some free time (but there's no hurry since you have the problem solved already). PS: Will leave the issue opened until the feature is added. |
Sure, go ahead, it would be cool! |
Any news for this feature request? I'm working with React + Bootstrap styling components in CSS modules. And the Bootstrap's CSS tends to be compiled into each and every chunk where Bootstrap's styles are used. So it can be easily multiplied 5 times in a project with 3 entrypoints and few common chuncks. I spent a day to playing with different plugins and settings and no success at all. So this feature would be extremely helpful. |
We use extract-css-chunks-webpack-plugin to get the css chunks for every js chunk and when we use optimize plugin optimization works for main file and for chunks separately and there is no duplications if we look to the files directly one by one but we see the one rule happens in main css file and the same rule we face one time in chunk css file.
Expected behaviour is to remove the generic rule from chunk because it's already in the main file.
The text was updated successfully, but these errors were encountered: