The deduplication algorithm is also deduping nested imports, resulting in broken/wrong CSS.
Full description of the problem
Let's say we have two SCSS files: `style.scss` which is our main file and `group.scss` which contains a bunch of generic rules. We now want those rules to be imported under a class:
```
.a {
@import 'group'
}
```
*This will work as expected* and the resulting file will look for ex. like this:
```
.a .c {
color: red
}
```
Unfortunately if we try to do it in more than one place, the dedupe algorithm will wrongly assume we don't need to import the same file multiple times and silently break our CSS:
```
.a {
@import 'group'
}
.b {
@import 'group'
}
```
The above code will result in broken:
```
.a .c {
color: red
}
/* .b is missing because it didn't contain any rules */
```
The deduplication algorithm is also deduping nested imports, resulting in broken/wrong CSS.
Full description of the problem
Let's say we have two SCSS files: `style.scss` which is our main file and `group.scss` which contains a bunch of generic rules. We now want those rules to be imported under a class: ``` .a { @import 'group' } ``` *This will work as expected* and the resulting file will look for ex. like this: ``` .a .c { color: red } ``` Unfortunately if we try to do it in more than one place, the dedupe algorithm will wrongly assume we don't need to import the same file multiple times and silently break our CSS: ``` .a { @import 'group' } .b { @import 'group' } ``` The above code will result in broken: ``` .a .c { color: red } /* .b is missing because it didn't contain any rules */ ```I've created a repository from above example. I believe deduping @import should only work if it's in root of the document and not when it's nested.