css-modules / css-modules-loader-core

A loader-agnostic CSS Modules implementation, based on PostCSS
91 stars 34 forks source link

File gets included twice when composes a file directly and indirectly #155

Closed madpilot closed 8 years ago

madpilot commented 8 years ago

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 8 years ago

@madpilot out of interest, does this kind of thing appear to get picked up by any of the postcss optimizers (csso, cssnano)?

madpilot commented 8 years ago

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

joshwnj commented 8 years ago

lol even I forgot I did this: #62

joshwnj commented 8 years ago

@madpilot css-modules-loader-core@1.0.1