Open alexander-akait opened 4 years ago
When trying to solve this issue maybe take a look at #530
Also the real problem is that css order should not depended only on import order because it can create cases that you cant satisfy all constraints.
x.js imports a.css then b.css y.js imports b.css then a.css z.js imports x.js and y.js
Any news?
I made a proposal in css-loader
: https://github.com/webpack-contrib/css-loader/issues/1602
Expected Behavior
After dynamically importing component, which composes css class, that an already present component also composes, the existing component should preserve its styles.
Actual Behavior
After dynamically importing component
B
, componentsC
styles get overriden.Code
Result:
Webpack config:
How Do We Reproduce?
For reproduction, see this minimal repo: https://github.com/OHUSAR/css-modules-chunk-specificity-bug
Originally posted by @OHUSAR in https://github.com/webpack-contrib/css-loader/issues/997#issuecomment-609688409