File gets included twice when composes a file directly and indirectly
madpilot opened this issue · 4 comments
madpilot commented
The scenario is this:
file a composes a selector from file c and b (in that order)
file b composes a selector from file c
the output includes the source from file c twice (and in an order where the second inclusion will override the selector from b).
I have a failing test case here: https://github.com/madpilot/css-modules-loader-core/tree/master/test/test-cases/mixed-dependencies
joshwnj commented
@madpilot out of interest, does this kind of thing appear to get picked up by any of the postcss optimizers (csso, cssnano)?
madpilot commented
I haven't tried - I say it would...
I'm looking at it now, I think I have a solution but it looks like it breaks ordering