sass-loader 16.0.3 → 16.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -147,6 +147,7 @@ Thankfully there are two solutions to this problem:
147
147
  - **[`additionalData`](#additionaldata)**
148
148
  - **[`webpackImporter`](#webpackimporter)**
149
149
  - **[`warnRuleAsWarning`](#warnruleaswarning)**
150
+ - **[`api`](#api)**
150
151
 
151
152
  ### `implementation`
152
153
 
@@ -315,7 +316,6 @@ Please consult their respective documentation before using them:
315
316
  - [Dart Sass documentation](https://sass-lang.com/documentation/js-api/interfaces/Options) for all available `sass` options.
316
317
  - [Sass Embedded documentation](https://github.com/sass/embedded-host-node) for all available `sass` options.
317
318
  - [Node Sass documentation](https://github.com/sass/node-sass/#options) for all available `node-sass` options.
318
- - [Sass Embedded documentation](https://github.com/sass/embedded-host-node) for all available `sass` options.
319
319
 
320
320
  #### `object`
321
321
 
package/dist/utils.js CHANGED
@@ -159,6 +159,7 @@ async function getSassOptions(loaderContext, loaderOptions, content, implementat
159
159
  }
160
160
  if (useSourceMap) {
161
161
  sassOptions.sourceMap = true;
162
+ sassOptions.sourceMapIncludeSources = true;
162
163
  }
163
164
 
164
165
  // If we are compiling sass and indentedSyntax isn't set, automatically set it.
@@ -280,8 +281,9 @@ url, forWebpackResolver = false, fromImport = false) {
280
281
  // - imports that have media queries.
281
282
  //
282
283
  // The `node-sass` package sends `@import` ending on `.css` to importer, it is bug, so we skip resolve
284
+ // Also sass outputs as is `@import "style.css"`, but `@use "style.css"` should include CSS content
283
285
  if (extension === ".css") {
284
- return [];
286
+ return fromImport ? [] : [url];
285
287
  }
286
288
  const dirname = _path.default.dirname(request);
287
289
  const normalizedDirname = dirname === "." ? "" : `${dirname}/`;
@@ -534,7 +536,9 @@ function getWebpackImporter(loaderContext, implementation, includePaths) {
534
536
  const {
535
537
  fromImport
536
538
  } = this;
537
- resolve(prev, originalUrl, fromImport).then(result => {
539
+ resolve(prev, originalUrl,
540
+ // For `node-sass`
541
+ typeof fromImport === "undefined" ? true : fromImport).then(result => {
538
542
  // Add the result as dependency.
539
543
  // Although we're also using stats.includedFiles, this might come in handy when an error occurs.
540
544
  // In this case, we don't get stats.includedFiles from node-sass/sass.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-loader",
3
- "version": "16.0.3",
3
+ "version": "16.0.5",
4
4
  "description": "Sass loader for webpack",
5
5
  "license": "MIT",
6
6
  "repository": "webpack-contrib/sass-loader",