You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-17Lines changed: 13 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,9 +95,9 @@ module.exports = {
95
95
96
96
Finally run `webpack` via your preferred method (e.g., via CLI or an npm script).
97
97
98
-
### The `style`(new API, by default since 16 version) and `outputStyle` (old API) options in `production` mode
98
+
### The `style`option in `production` mode
99
99
100
-
For `production` mode, the `style`(new API, by default since 16 version) and `outputStyle` (old API) options default to `compressed` unless otherwise specified in `sassOptions`.
100
+
For `production` mode, the `style`option defaults to `compressed` unless otherwise specified in `sassOptions`.
@@ -283,17 +283,13 @@ Options for [Dart Sass](http://sass-lang.com/dart-sass) or [Sass Embedded](https
283
283
284
284
> [!NOTE]
285
285
>
286
-
> The `syntax`(new API, by default since 16 version) and `indentedSyntax` (old API) option is `scss` for the `scss` extension, `indented` for the `sass` extension, and `css` for the `css` extension.
286
+
> The `syntax` option is `scss` for the `scss` extension, `indented` for the `sass` extension, and `css` for the `css` extension.
287
287
288
288
> [!NOTE]
289
289
>
290
-
> Options such as `data` and `file` are unavailable and will be ignored.
290
+
> Options such as `data` and `url` are unavailable and will be ignored.
291
291
292
-
> ℹ We strongly discourage changing the `sourceMap` (new API, by default since 16 version), `outFile` (old API), `sourceMapContents` (old API), `sourceMapEmbed` (old API), and `sourceMapRoot` (old API) options because `sass-loader` sets these automatically when the `sourceMap` option is `true`.
293
-
294
-
> [!NOTE]
295
-
>
296
-
> 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.
292
+
> ℹ We strongly discourage changing the `sourceMap` option because `sass-loader` sets it automatically when the `sourceMap` option is `true`.
297
293
298
294
Please consult their respective documentation before using them:
299
295
@@ -386,7 +382,7 @@ Enables/disables generation of source maps.
386
382
By default generation of source maps depends on the [`devtool`](https://webpack.js.org/configuration/devtool/) option.
387
383
All values enable source map generation except `eval` and `false`.
388
384
389
-
> ℹ If `true`, the `sourceMap`(new API, by default since 16 version), `outFile` (old API), `sourceMapContents` (old API), `sourceMapEmbed` (old API), and `sourceMapRoot` (old API) from `sassOptions` will be ignored.
385
+
> ℹ If `true`, the `sourceMap`option from `sassOptions` will be ignored.
390
386
391
387
**webpack.config.js**
392
388
@@ -433,7 +429,7 @@ module.exports = {
433
429
options: {
434
430
sourceMap:true,
435
431
sassOptions: {
436
-
outputStyle:"compressed",
432
+
style:"compressed",
437
433
},
438
434
},
439
435
},
@@ -661,20 +657,20 @@ module.exports = {
661
657
Type:
662
658
663
659
```ts
664
-
typeapi="legacy"|"modern"|"modern-compiler";
660
+
typeapi="modern"|"modern-compiler";
665
661
```
666
662
667
663
Default: `"modern"` for `sass` (`dart-sass`) and `sass-embedded`
668
664
669
-
Allows you to switch between the `legacy` and `modern` APIs. 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).
665
+
Allows you to switch between the `modern` and `modern-compiler` APIs. 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).
670
666
671
667
> [!NOTE]
672
668
>
673
669
> Using `modern-compiler` and `sass-embedded` together significantly improves performance and decreases build time. We strongly recommend their use. We will enable them by default in a future major release.
674
670
675
-
> [!WARNING]
671
+
> [!NOTE]
676
672
>
677
-
> The Sass options are different for the `legacy` and `modern` APIs. Please look at [docs](https://sass-lang.com/documentation/js-api) to learn how to migrate to the modern options.
673
+
> The legacy Sass JS API is no longer supported. If you were using `api: "legacy"`, please migrate to the modern API. See the [Sass JS API docs](https://sass-lang.com/documentation/js-api) to learn how to migrate.
0 commit comments