webpack-contrib / mini-css-extract-plugin

Lightweight CSS extraction plugin
MIT License
4.66k stars 389 forks source link

Production environment css style repeated packaging #1068

Closed shwehb closed 9 months ago

shwehb commented 9 months ago

Bug report

The same css exists in the entry file and the asynchronous import file, causing the entry file css style to be overwritten when the asynchronous chunk is loaded. Is it the expected result?

mini-css-extract-plugin@2.7.6

Actual Behavior

Expected Behavior

How Do We Reproduce?

Please paste the results of npx webpack-cli info here, and mention other relevant information

alexander-akait commented 9 months ago

Hello, yes, it is expected, because you have global styles and when override them in async CSS chunk, this is how it works

Please fill out all fields in future if you want more infromation and examples how it can be fixed, feel free to feedback