Skip to content

Commit a402641

Browse files
authored
Update README.md (add warnings about sass imports)
1 parent ae64ac5 commit a402641

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
// ... rules for other file types,
2727

2828
getCssLoaders({}, true) // You can drop the 2nd argument if you don't need sass/scss
29+
// NOTE: The above call will likely change in next major version
2930
],
3031
},
3132
// Other options
@@ -78,7 +79,13 @@ function MyComponent (props) {
7879

7980
export default MyComponent;
8081
```
81-
For a more advanced scenario, see the example code, or even better run it yourself (instructions below).
82+
> [!WARNING]
83+
> If using SCSS/SASS **do not** import files that mix mixins/functions and normal rules in their content into any stylesheets containing `@scope`.
84+
> This will not compile, because the compiler will include other css before `@scope`.
85+
> Remember: `@scope` must be the first line or just after any imports.
86+
> This issue might be fixed in a future release.
87+
88+
For a more advanced scope usage scenario, see the example code, or even better run it yourself (instructions below).
8289
8390
## Running the example (or for plugin development)
8491
1. clone the repository `git clone https://github.com/Wiktor102/webpack-scoped-css.git`

0 commit comments

Comments
 (0)