|
38 | 38 | pnpm add -D sass-loader sass webpack |
39 | 39 | ``` |
40 | 40 |
|
| 41 | +> [!NOTE] |
| 42 | +> |
| 43 | +> To enable CSS processing in your project, you need to install [style-loader](https://webpack.js.org/loaders/style-loader/) and [css-loader](https://webpack.js.org/loaders/css-loader/) via `npm i style-loader css-loader`. |
| 44 | +
|
41 | 45 | `sass-loader` requires you to install either [Dart Sass](https://github.com/sass/dart-sass), [Node Sass](https://github.com/sass/node-sass) on your own (more documentation can be found below) or [Sass Embedded](https://github.com/sass/embedded-host-node). |
42 | 46 |
|
43 | 47 | This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use. |
44 | 48 |
|
45 | | -> **Note** |
| 49 | +> [!NOTE] |
46 | 50 | > |
47 | 51 | > We highly recommend using [Dart Sass](https://github.com/sass/dart-sass). |
48 | 52 |
|
49 | | -> **Warning** |
| 53 | +> [!WARNING] |
50 | 54 | > |
51 | 55 | > [Node Sass](https://github.com/sass/node-sass) does not work with [Yarn PnP](https://classic.yarnpkg.com/en/docs/pnp/) feature and doesn't support [@use rule](https://sass-lang.com/documentation/at-rules/use). |
52 | 56 |
|
53 | | -> **Warning** |
| 57 | +> [!WARNING] |
54 | 58 | > |
55 | 59 | > [Sass Embedded](https://github.com/sass/embedded-host-node) is experimental and in `beta`, therefore some features may not work |
56 | 60 |
|
@@ -267,21 +271,21 @@ Default: defaults values for Sass implementation |
267 | 271 |
|
268 | 272 | Options for [Dart Sass](http://sass-lang.com/dart-sass) or [Node Sass](https://github.com/sass/node-sass) implementation. |
269 | 273 |
|
270 | | -> **Note** |
| 274 | +> [!NOTE] |
271 | 275 | > |
272 | 276 | > The `charset` option has `true` value by default for `dart-sass`, we strongly discourage change value to `false`, because webpack doesn't support files other than `utf-8`. |
273 | 277 |
|
274 | | -> **Note** |
| 278 | +> [!NOTE] |
275 | 279 | > |
276 | 280 | > The `indentedSyntax` option has `true` value for the `sass` extension. |
277 | 281 |
|
278 | | -> **Note** |
| 282 | +> [!NOTE] |
279 | 283 | > |
280 | 284 | > Options such as `data` and `file` are unavailable and will be ignored. |
281 | 285 |
|
282 | 286 | > ℹ We strongly discourage change `outFile`, `sourceMapContents`, `sourceMapEmbed`, `sourceMapRoot` options because `sass-loader` automatically sets these options when the `sourceMap` option is `true`. |
283 | 287 |
|
284 | | -> **Note** |
| 288 | +> [!NOTE] |
285 | 289 | > |
286 | 290 | > Access to the [loader context](https://webpack.js.org/api/loaders/#the-loader-context) inside the custom importer can be done using the `this.webpackLoaderContext` property. |
287 | 291 |
|
@@ -664,11 +668,11 @@ Default: `"legacy"` |
664 | 668 |
|
665 | 669 | Allows you to switch between `legacy` and `modern` API. You can find more information [here](https://sass-lang.com/documentation/js-api). The `modern-compiler` option enables the modern API with support for [Shared Resources](https://github.com/sass/sass/blob/main/accepted/shared-resources.d.ts.md). |
666 | 670 |
|
667 | | -> **Note** |
| 671 | +> [!NOTE] |
668 | 672 | > |
669 | 673 | > Using `modern-compiler` and `sass-embedded` together significantly improve performance and decrease built time. We strongly recommend their use. We will enable them by default in a future major release. |
670 | 674 |
|
671 | | -> **Warning** |
| 675 | +> [!WARNING] |
672 | 676 | > |
673 | 677 | > The sass options are different for `modern` and `old` APIs. Please look at [docs](https://sass-lang.com/documentation/js-api) how to migrate on new options. |
674 | 678 |
|
|
0 commit comments