File tree 1 file changed +24
-0
lines changed
docs/documentation/stories
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,27 @@ You can also rename the output and lazy load it by using the object format:
26
26
{ "input" : " pre-rename-style.scss" , "output" : " renamed-style" },
27
27
],
28
28
```
29
+
30
+ In Sass and Stylus you can also make use of the ` includePaths ` functionality for both component and
31
+ global styles, which allows you to add extra base paths that will be checked for imports.
32
+
33
+ To add paths, use the ` stylePreprocessorOptions ` entry in angular-cli.json ` app ` object:
34
+
35
+ ```
36
+ "stylePreprocessorOptions": {
37
+ "includePaths": [
38
+ "style-paths"
39
+ ]
40
+ },
41
+ ```
42
+
43
+ Files in that folder, e.g. ` src/style-paths/_variables.scss ` , can be imported from anywhere in your
44
+ project without the need for a relative path:
45
+
46
+ ```
47
+ // src/app/app.component.scss
48
+ // A relative path works
49
+ @import '../style-paths/variables';
50
+ // But now this works as well
51
+ @import 'variables';
52
+ ```
You can’t perform that action at this time.
0 commit comments