sass-loader 16.0.4 → 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.
Files changed (2) hide show
  1. package/dist/utils.js +5 -2
  2. package/package.json +1 -1
package/dist/utils.js CHANGED
@@ -281,8 +281,9 @@ url, forWebpackResolver = false, fromImport = false) {
281
281
  // - imports that have media queries.
282
282
  //
283
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
284
285
  if (extension === ".css") {
285
- return [];
286
+ return fromImport ? [] : [url];
286
287
  }
287
288
  const dirname = _path.default.dirname(request);
288
289
  const normalizedDirname = dirname === "." ? "" : `${dirname}/`;
@@ -535,7 +536,9 @@ function getWebpackImporter(loaderContext, implementation, includePaths) {
535
536
  const {
536
537
  fromImport
537
538
  } = this;
538
- resolve(prev, originalUrl, fromImport).then(result => {
539
+ resolve(prev, originalUrl,
540
+ // For `node-sass`
541
+ typeof fromImport === "undefined" ? true : fromImport).then(result => {
539
542
  // Add the result as dependency.
540
543
  // Although we're also using stats.includedFiles, this might come in handy when an error occurs.
541
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.4",
3
+ "version": "16.0.5",
4
4
  "description": "Sass loader for webpack",
5
5
  "license": "MIT",
6
6
  "repository": "webpack-contrib/sass-loader",