sass-loader 11.0.1 → 12.1.0
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 +41 -9
- package/dist/options.json +8 -1
- package/dist/utils.js +87 -24
- package/package.json +29 -30
- package/CHANGELOG.md +0 -567
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img height="
|
|
2
|
+
<img height="170"
|
|
3
3
|
src="https://worldvectorlogo.com/logos/sass-1.svg">
|
|
4
4
|
<a href="https://github.com/webpack/webpack">
|
|
5
5
|
<img width="200" height="200"
|
|
@@ -31,9 +31,9 @@ npm install sass-loader sass webpack --save-dev
|
|
|
31
31
|
|
|
32
32
|
This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use.
|
|
33
33
|
|
|
34
|
-
> ℹ️ We recommend using [Dart Sass](https://github.com/sass/dart-sass).
|
|
34
|
+
> ℹ️ We highly recommend using [Dart Sass](https://github.com/sass/dart-sass).
|
|
35
35
|
|
|
36
|
-
> ⚠ [Node Sass](https://github.com/sass/node-sass) does not work with [Yarn PnP](https://classic.yarnpkg.com/en/docs/pnp/) feature.
|
|
36
|
+
> ⚠ [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).
|
|
37
37
|
|
|
38
38
|
Chain the `sass-loader` with the [css-loader](https://github.com/webpack-contrib/css-loader) and the [style-loader](https://github.com/webpack-contrib/style-loader) to immediately apply all styles to the DOM or the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file.
|
|
39
39
|
|
|
@@ -91,14 +91,15 @@ Thus you can import your Sass modules from `node_modules`.
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Using `~` is deprecated and can be removed from your code (**we recommend it**), but we still support it for historical reasons.
|
|
94
|
-
Why you
|
|
95
|
-
|
|
94
|
+
Why can you remove it? The loader will first try to resolve `@import` as a relative path. If it cannot be resolved, then the loader will try to resolve `@import` inside [`node_modules`](https://webpack.js.org/configuration/resolve/#resolvemodules).
|
|
95
|
+
|
|
96
|
+
Prepending module paths with a `~` tells webpack to search through [`node_modules`](https://webpack.js.org/configuration/resolve/#resolvemodules).
|
|
96
97
|
|
|
97
98
|
```scss
|
|
98
99
|
@import "~bootstrap";
|
|
99
100
|
```
|
|
100
101
|
|
|
101
|
-
It's important to
|
|
102
|
+
It's important to prepend it with only `~`, because `~/` resolves to the home directory.
|
|
102
103
|
Webpack needs to distinguish between `bootstrap` and `~bootstrap` because CSS and Sass files have no special syntax for importing relative files.
|
|
103
104
|
Writing `@import "style.scss"` is the same as `@import "./style.scss";`
|
|
104
105
|
|
|
@@ -120,7 +121,7 @@ Thankfully there are a two solutions to this problem:
|
|
|
120
121
|
|
|
121
122
|
| Name | Type | Default | Description |
|
|
122
123
|
| :---------------------------------------: | :------------------: | :-------------------------------------: | :---------------------------------------------------------------- |
|
|
123
|
-
| **[`implementation`](#implementation)** |
|
|
124
|
+
| **[`implementation`](#implementation)** | `{Object\|String}` | `sass` | Setup Sass implementation to use. |
|
|
124
125
|
| **[`sassOptions`](#sassoptions)** | `{Object\|Function}` | defaults values for Sass implementation | Options for Sass. |
|
|
125
126
|
| **[`sourceMap`](#sourcemap)** | `{Boolean}` | `compiler.devtool` | Enables/Disables generation of source maps. |
|
|
126
127
|
| **[`additionalData`](#additionaldata)** | `{String\|Function}` | `undefined` | Prepends/Appends `Sass`/`SCSS` code before the actual entry file. |
|
|
@@ -128,7 +129,7 @@ Thankfully there are a two solutions to this problem:
|
|
|
128
129
|
|
|
129
130
|
### `implementation`
|
|
130
131
|
|
|
131
|
-
Type: `Object`
|
|
132
|
+
Type: `Object | String`
|
|
132
133
|
Default: `sass`
|
|
133
134
|
|
|
134
135
|
The special `implementation` option determines which implementation of Sass to use.
|
|
@@ -167,6 +168,8 @@ In order to avoid this situation you can use the `implementation` option.
|
|
|
167
168
|
|
|
168
169
|
The `implementation` options either accepts `sass` (`Dart Sass`) or `node-sass` as a module.
|
|
169
170
|
|
|
171
|
+
#### Object
|
|
172
|
+
|
|
170
173
|
For example, to use Dart Sass, you'd pass:
|
|
171
174
|
|
|
172
175
|
```js
|
|
@@ -192,10 +195,39 @@ module.exports = {
|
|
|
192
195
|
};
|
|
193
196
|
```
|
|
194
197
|
|
|
198
|
+
#### String
|
|
199
|
+
|
|
200
|
+
For example, to use Dart Sass, you'd pass:
|
|
201
|
+
|
|
202
|
+
```js
|
|
203
|
+
module.exports = {
|
|
204
|
+
module: {
|
|
205
|
+
rules: [
|
|
206
|
+
{
|
|
207
|
+
test: /\.s[ac]ss$/i,
|
|
208
|
+
use: [
|
|
209
|
+
"style-loader",
|
|
210
|
+
"css-loader",
|
|
211
|
+
{
|
|
212
|
+
loader: "sass-loader",
|
|
213
|
+
options: {
|
|
214
|
+
// Prefer `dart-sass`
|
|
215
|
+
implementation: require.resolve("sass"),
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
```
|
|
224
|
+
|
|
195
225
|
Note that when using `sass` (`Dart Sass`), **synchronous compilation is twice as fast as asynchronous compilation** by default, due to the overhead of asynchronous callbacks.
|
|
196
226
|
To avoid this overhead, you can use the [fibers](https://www.npmjs.com/package/fibers) package to call asynchronous importers from the synchronous code path.
|
|
197
227
|
|
|
198
|
-
We automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package (setup `sassOptions.fiber`) if is possible (i.e. you need install the [`fibers`](https://github.com/laverdet/node-fibers) package).
|
|
228
|
+
We automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package (setup `sassOptions.fiber`) for `Node.js` less v16.0.0 if is possible (i.e. you need install the [`fibers`](https://github.com/laverdet/node-fibers) package).
|
|
229
|
+
|
|
230
|
+
> Fibers is not compatible with `Node.js` v16.0.0 or later ([see introduction to readme](https://github.com/laverdet/node-fibers)).
|
|
199
231
|
|
|
200
232
|
**package.json**
|
|
201
233
|
|
package/dist/options.json
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
"properties": {
|
|
5
5
|
"implementation": {
|
|
6
6
|
"description": "The implementation of the sass to be used (https://github.com/webpack-contrib/sass-loader#implementation).",
|
|
7
|
-
"
|
|
7
|
+
"anyOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
8
15
|
},
|
|
9
16
|
"sassOptions": {
|
|
10
17
|
"description": "Options for `node-sass` or `sass` (`Dart Sass`) implementation. (https://github.com/webpack-contrib/sass-loader#implementation).",
|
package/dist/utils.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.getWebpackResolver = getWebpackResolver;
|
|
|
9
9
|
exports.getWebpackImporter = getWebpackImporter;
|
|
10
10
|
exports.getRenderFunctionFromSassImplementation = getRenderFunctionFromSassImplementation;
|
|
11
11
|
exports.normalizeSourceMap = normalizeSourceMap;
|
|
12
|
+
exports.isSupportedFibers = isSupportedFibers;
|
|
12
13
|
|
|
13
14
|
var _url = _interopRequireDefault(require("url"));
|
|
14
15
|
|
|
@@ -39,9 +40,7 @@ function getDefaultSassImplementation() {
|
|
|
39
40
|
return require(sassImplPkg);
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
-
* This function is not Webpack-specific and can be used by tools wishing to
|
|
44
|
-
* mimic `sass-loader`'s behaviour, so its signature should not be changed.
|
|
43
|
+
* This function is not Webpack-specific and can be used by tools wishing to mimic `sass-loader`'s behaviour, so its signature should not be changed.
|
|
45
44
|
*/
|
|
46
45
|
|
|
47
46
|
|
|
@@ -57,6 +56,17 @@ function getSassImplementation(loaderContext, implementation) {
|
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
|
|
59
|
+
if (typeof resolvedImplementation === "string") {
|
|
60
|
+
try {
|
|
61
|
+
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
62
|
+
resolvedImplementation = require(resolvedImplementation);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
loaderContext.emitError(error); // eslint-disable-next-line consistent-return
|
|
65
|
+
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
60
70
|
const {
|
|
61
71
|
info
|
|
62
72
|
} = resolvedImplementation;
|
|
@@ -85,6 +95,11 @@ function getSassImplementation(loaderContext, implementation) {
|
|
|
85
95
|
|
|
86
96
|
loaderContext.emitError(new Error(`Unknown Sass implementation "${implementationName}".`));
|
|
87
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* @param {any} loaderContext
|
|
100
|
+
* @returns {boolean}
|
|
101
|
+
*/
|
|
102
|
+
|
|
88
103
|
|
|
89
104
|
function isProductionLikeMode(loaderContext) {
|
|
90
105
|
return loaderContext.mode === "production" || !loaderContext.mode;
|
|
@@ -92,10 +107,17 @@ function isProductionLikeMode(loaderContext) {
|
|
|
92
107
|
|
|
93
108
|
function proxyCustomImporters(importers, loaderContext) {
|
|
94
109
|
return [].concat(importers).map(importer => function proxyImporter(...args) {
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
const self = { ...this,
|
|
111
|
+
webpackLoaderContext: loaderContext
|
|
112
|
+
};
|
|
113
|
+
return importer.apply(self, args);
|
|
97
114
|
});
|
|
98
115
|
}
|
|
116
|
+
|
|
117
|
+
function isSupportedFibers() {
|
|
118
|
+
const [nodeVersion] = process.versions.node.split(".");
|
|
119
|
+
return Number(nodeVersion) < 16;
|
|
120
|
+
}
|
|
99
121
|
/**
|
|
100
122
|
* Derives the sass options from the loader context and normalizes its values with sane defaults.
|
|
101
123
|
*
|
|
@@ -112,7 +134,7 @@ async function getSassOptions(loaderContext, loaderOptions, content, implementat
|
|
|
112
134
|
const options = (0, _full.klona)(loaderOptions.sassOptions ? typeof loaderOptions.sassOptions === "function" ? loaderOptions.sassOptions(loaderContext) || {} : loaderOptions.sassOptions : {});
|
|
113
135
|
const isDartSass = implementation.info.includes("dart-sass");
|
|
114
136
|
|
|
115
|
-
if (isDartSass) {
|
|
137
|
+
if (isDartSass && isSupportedFibers()) {
|
|
116
138
|
const shouldTryToResolveFibers = !options.fiber && options.fiber !== false;
|
|
117
139
|
|
|
118
140
|
if (shouldTryToResolveFibers) {
|
|
@@ -197,12 +219,12 @@ const IS_MODULE_IMPORT = /^~([^/]+|[^/]+\/|@[^/]+[/][^/]+|@[^/]+\/?|@[^/]+[/][^/
|
|
|
197
219
|
*
|
|
198
220
|
* @param {string} url
|
|
199
221
|
* @param {boolean} forWebpackResolver
|
|
200
|
-
* @param {
|
|
222
|
+
* @param {boolean} fromImport
|
|
201
223
|
* @returns {Array<string>}
|
|
202
224
|
*/
|
|
203
225
|
|
|
204
226
|
function getPossibleRequests( // eslint-disable-next-line no-shadow
|
|
205
|
-
url, forWebpackResolver = false) {
|
|
227
|
+
url, forWebpackResolver = false, fromImport = false) {
|
|
206
228
|
let request = url; // In case there is module request, send this to webpack resolver
|
|
207
229
|
|
|
208
230
|
if (forWebpackResolver) {
|
|
@@ -218,7 +240,7 @@ url, forWebpackResolver = false) {
|
|
|
218
240
|
// @see https://github.com/webpack-contrib/sass-loader/issues/167
|
|
219
241
|
|
|
220
242
|
|
|
221
|
-
const
|
|
243
|
+
const extension = _path.default.extname(request).toLowerCase(); // Because @import is also defined in CSS, Sass needs a way of compiling plain CSS @imports without trying to import the files at compile time.
|
|
222
244
|
// To accomplish this, and to ensure SCSS is as much of a superset of CSS as possible, Sass will compile any @imports with the following characteristics to plain CSS imports:
|
|
223
245
|
// - imports where the URL ends with .css.
|
|
224
246
|
// - imports where the URL begins http:// or https://.
|
|
@@ -228,15 +250,19 @@ url, forWebpackResolver = false) {
|
|
|
228
250
|
// The `node-sass` package sends `@import` ending on `.css` to importer, it is bug, so we skip resolve
|
|
229
251
|
|
|
230
252
|
|
|
231
|
-
if (
|
|
253
|
+
if (extension === ".css") {
|
|
232
254
|
return [];
|
|
233
255
|
}
|
|
234
256
|
|
|
235
257
|
const dirname = _path.default.dirname(request);
|
|
236
258
|
|
|
259
|
+
const normalizedDirname = dirname === "." ? "" : `${dirname}/`;
|
|
260
|
+
|
|
237
261
|
const basename = _path.default.basename(request);
|
|
238
262
|
|
|
239
|
-
|
|
263
|
+
const basenameWithoutExtension = _path.default.basename(request, extension);
|
|
264
|
+
|
|
265
|
+
return [...new Set([].concat(fromImport ? [`${normalizedDirname}_${basenameWithoutExtension}.import${extension}`, `${normalizedDirname}${basenameWithoutExtension}.import${extension}`] : []).concat([`${normalizedDirname}_${basename}`, `${normalizedDirname}${basename}`]).concat(forWebpackResolver ? [url] : []))];
|
|
240
266
|
}
|
|
241
267
|
|
|
242
268
|
function promiseResolve(callbackResolve) {
|
|
@@ -307,8 +333,16 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
307
333
|
}
|
|
308
334
|
}
|
|
309
335
|
|
|
310
|
-
const isDartSass = implementation.info.includes("dart-sass");
|
|
311
|
-
|
|
336
|
+
const isDartSass = implementation.info.includes("dart-sass"); // We only have one difference with the built-in sass resolution logic and out resolution logic:
|
|
337
|
+
// First, we look at the files starting with `_`, then without `_` (i.e. `_name.sass`, `_name.scss`, `_name.css`, `name.sass`, `name.scss`, `name.css`),
|
|
338
|
+
// although `sass` look together by extensions (i.e. `_name.sass`/`name.sass`/`_name.scss`/`name.scss`/`_name.css`/`name.css`).
|
|
339
|
+
// It shouldn't be a problem because `sass` throw errors:
|
|
340
|
+
// - on having `_name.sass` and `name.sass` (extension can be `sass`, `scss` or `css`) in the same directory
|
|
341
|
+
// - on having `_name.sass` and `_name.scss` in the same directory
|
|
342
|
+
//
|
|
343
|
+
// Also `sass` prefer `sass`/`scss` over `css`.
|
|
344
|
+
|
|
345
|
+
const sassModuleResolve = promiseResolve(resolverFactory({
|
|
312
346
|
alias: [],
|
|
313
347
|
aliasFields: [],
|
|
314
348
|
conditionNames: [],
|
|
@@ -321,7 +355,20 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
321
355
|
restrictions: [/\.((sa|sc|c)ss)$/i],
|
|
322
356
|
preferRelative: true
|
|
323
357
|
}));
|
|
324
|
-
const
|
|
358
|
+
const sassImportResolve = promiseResolve(resolverFactory({
|
|
359
|
+
alias: [],
|
|
360
|
+
aliasFields: [],
|
|
361
|
+
conditionNames: [],
|
|
362
|
+
descriptionFiles: [],
|
|
363
|
+
extensions: [".sass", ".scss", ".css"],
|
|
364
|
+
exportsFields: [],
|
|
365
|
+
mainFields: [],
|
|
366
|
+
mainFiles: ["_index.import", "_index", "index.import", "index"],
|
|
367
|
+
modules: [],
|
|
368
|
+
restrictions: [/\.((sa|sc|c)ss)$/i],
|
|
369
|
+
preferRelative: true
|
|
370
|
+
}));
|
|
371
|
+
const webpackModuleResolve = promiseResolve(resolverFactory({
|
|
325
372
|
dependencyType: "sass",
|
|
326
373
|
conditionNames: ["sass", "style"],
|
|
327
374
|
mainFields: ["sass", "style", "main", "..."],
|
|
@@ -330,7 +377,16 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
330
377
|
restrictions: [/\.((sa|sc|c)ss)$/i],
|
|
331
378
|
preferRelative: true
|
|
332
379
|
}));
|
|
333
|
-
|
|
380
|
+
const webpackImportResolve = promiseResolve(resolverFactory({
|
|
381
|
+
dependencyType: "sass",
|
|
382
|
+
conditionNames: ["sass", "style"],
|
|
383
|
+
mainFields: ["sass", "style", "main", "..."],
|
|
384
|
+
mainFiles: ["_index.import", "_index", "index.import", "index", "..."],
|
|
385
|
+
extensions: [".sass", ".scss", ".css"],
|
|
386
|
+
restrictions: [/\.((sa|sc|c)ss)$/i],
|
|
387
|
+
preferRelative: true
|
|
388
|
+
}));
|
|
389
|
+
return (context, request, fromImport) => {
|
|
334
390
|
// See https://github.com/webpack/webpack/issues/12340
|
|
335
391
|
// Because `node-sass` calls our importer before `1. Filesystem imports relative to the base file.`
|
|
336
392
|
// custom importer may not return `{ file: '/path/to/name.ext' }` and therefore our `context` will be relative
|
|
@@ -369,11 +425,11 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
369
425
|
// 5. Filesystem imports relative to a `SASS_PATH` path.
|
|
370
426
|
//
|
|
371
427
|
// `sass` run custom importers before `3`, `4` and `5` points, we need to emulate this behavior to avoid wrong resolution.
|
|
372
|
-
const sassPossibleRequests = getPossibleRequests(request); // `node-sass` calls our importer before `1. Filesystem imports relative to the base file.`, so we need emulate this too
|
|
428
|
+
const sassPossibleRequests = getPossibleRequests(request, false, fromImport); // `node-sass` calls our importer before `1. Filesystem imports relative to the base file.`, so we need emulate this too
|
|
373
429
|
|
|
374
430
|
if (!isDartSass) {
|
|
375
431
|
resolutionMap = resolutionMap.concat({
|
|
376
|
-
resolve:
|
|
432
|
+
resolve: fromImport ? sassImportResolve : sassModuleResolve,
|
|
377
433
|
context: _path.default.dirname(context),
|
|
378
434
|
possibleRequests: sassPossibleRequests
|
|
379
435
|
});
|
|
@@ -382,16 +438,16 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
382
438
|
resolutionMap = resolutionMap.concat( // eslint-disable-next-line no-shadow
|
|
383
439
|
includePaths.map(context => {
|
|
384
440
|
return {
|
|
385
|
-
resolve:
|
|
441
|
+
resolve: fromImport ? sassImportResolve : sassModuleResolve,
|
|
386
442
|
context,
|
|
387
443
|
possibleRequests: sassPossibleRequests
|
|
388
444
|
};
|
|
389
445
|
}));
|
|
390
446
|
}
|
|
391
447
|
|
|
392
|
-
const webpackPossibleRequests = getPossibleRequests(request, true);
|
|
448
|
+
const webpackPossibleRequests = getPossibleRequests(request, true, fromImport);
|
|
393
449
|
resolutionMap = resolutionMap.concat({
|
|
394
|
-
resolve:
|
|
450
|
+
resolve: fromImport ? webpackImportResolve : webpackModuleResolve,
|
|
395
451
|
context: _path.default.dirname(context),
|
|
396
452
|
possibleRequests: webpackPossibleRequests
|
|
397
453
|
});
|
|
@@ -399,19 +455,22 @@ function getWebpackResolver(resolverFactory, implementation, includePaths = [])
|
|
|
399
455
|
};
|
|
400
456
|
}
|
|
401
457
|
|
|
402
|
-
const
|
|
458
|
+
const MATCH_CSS = /\.css$/i;
|
|
403
459
|
|
|
404
460
|
function getWebpackImporter(loaderContext, implementation, includePaths) {
|
|
405
461
|
const resolve = getWebpackResolver(loaderContext.getResolve, implementation, includePaths);
|
|
406
|
-
return (originalUrl, prev, done)
|
|
407
|
-
|
|
462
|
+
return function importer(originalUrl, prev, done) {
|
|
463
|
+
const {
|
|
464
|
+
fromImport
|
|
465
|
+
} = this;
|
|
466
|
+
resolve(prev, originalUrl, fromImport).then(result => {
|
|
408
467
|
// Add the result as dependency.
|
|
409
468
|
// Although we're also using stats.includedFiles, this might come in handy when an error occurs.
|
|
410
469
|
// In this case, we don't get stats.includedFiles from node-sass/sass.
|
|
411
470
|
loaderContext.addDependency(_path.default.normalize(result)); // By removing the CSS file extension, we trigger node-sass to include the CSS file instead of just linking it.
|
|
412
471
|
|
|
413
472
|
done({
|
|
414
|
-
file: result.replace(
|
|
473
|
+
file: result.replace(MATCH_CSS, "")
|
|
415
474
|
});
|
|
416
475
|
}) // Catch all resolving errors, return the original file and pass responsibility back to other custom importers
|
|
417
476
|
.catch(() => {
|
|
@@ -449,6 +508,10 @@ function getRenderFunctionFromSassImplementation(implementation) {
|
|
|
449
508
|
}
|
|
450
509
|
|
|
451
510
|
const ABSOLUTE_SCHEME = /^[A-Za-z0-9+\-.]+:/;
|
|
511
|
+
/**
|
|
512
|
+
* @param {string} source
|
|
513
|
+
* @returns {"absolute" | "scheme-relative" | "path-absolute" | "path-absolute"}
|
|
514
|
+
*/
|
|
452
515
|
|
|
453
516
|
function getURLType(source) {
|
|
454
517
|
if (source[0] === "/") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "Sass loader for webpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "webpack-contrib/sass-loader",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/cjs.js",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">= 12.13.0"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"start": "npm run build -- -w",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"prebuild": "npm run clean",
|
|
22
22
|
"build": "cross-env NODE_ENV=production babel src -d dist --copy-files",
|
|
23
23
|
"commitlint": "commitlint --from=master",
|
|
24
|
-
"security": "npm audit",
|
|
24
|
+
"security": "npm audit --production",
|
|
25
25
|
"lint:prettier": "prettier --list-different .",
|
|
26
26
|
"lint:js": "eslint --cache .",
|
|
27
27
|
"lint": "npm-run-all -l -p \"lint:**\"",
|
|
@@ -31,16 +31,15 @@
|
|
|
31
31
|
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
|
|
32
32
|
"pretest": "npm run lint",
|
|
33
33
|
"test": "npm run test:coverage",
|
|
34
|
-
"prepare": "npm run build",
|
|
35
|
-
"release": "standard-version"
|
|
36
|
-
"defaults": "webpack-defaults"
|
|
34
|
+
"prepare": "husky install && npm run build",
|
|
35
|
+
"release": "standard-version"
|
|
37
36
|
},
|
|
38
37
|
"files": [
|
|
39
38
|
"dist"
|
|
40
39
|
],
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"fibers": ">= 3.1.0",
|
|
43
|
-
"node-sass": "^4.0.0 || ^5.0.0",
|
|
42
|
+
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0",
|
|
44
43
|
"sass": "^1.3.0",
|
|
45
44
|
"webpack": "^5.0.0"
|
|
46
45
|
},
|
|
@@ -60,41 +59,41 @@
|
|
|
60
59
|
"neo-async": "^2.6.2"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@babel/cli": "^7.
|
|
64
|
-
"@babel/core": "^7.
|
|
65
|
-
"@babel/preset-env": "^7.
|
|
66
|
-
"@commitlint/cli": "^
|
|
67
|
-
"@commitlint/config-conventional": "^
|
|
68
|
-
"@webpack-contrib/defaults": "^6.3.0",
|
|
62
|
+
"@babel/cli": "^7.14.5",
|
|
63
|
+
"@babel/core": "^7.14.5",
|
|
64
|
+
"@babel/preset-env": "^7.14.5",
|
|
65
|
+
"@commitlint/cli": "^12.1.4",
|
|
66
|
+
"@commitlint/config-conventional": "^12.1.4",
|
|
69
67
|
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
|
|
70
|
-
"babel-jest": "^
|
|
71
|
-
"bootstrap": "^4.5.3",
|
|
68
|
+
"babel-jest": "^27.0.2",
|
|
72
69
|
"bootstrap-sass": "^3.4.1",
|
|
70
|
+
"bootstrap-v4": "npm:bootstrap@^4.5.3",
|
|
71
|
+
"bootstrap-v5": "npm:bootstrap@^5.0.1",
|
|
73
72
|
"cross-env": "^7.0.3",
|
|
74
|
-
"css-loader": "^5.
|
|
73
|
+
"css-loader": "^5.2.6",
|
|
75
74
|
"del": "^6.0.0",
|
|
76
75
|
"del-cli": "^3.0.1",
|
|
77
|
-
"enhanced-resolve": "^5.
|
|
78
|
-
"eslint": "^7.
|
|
79
|
-
"eslint-config-prettier": "^
|
|
80
|
-
"eslint-plugin-import": "^2.
|
|
76
|
+
"enhanced-resolve": "^5.8.2",
|
|
77
|
+
"eslint": "^7.28.0",
|
|
78
|
+
"eslint-config-prettier": "^8.3.0",
|
|
79
|
+
"eslint-plugin-import": "^2.23.3",
|
|
81
80
|
"fibers": "^5.0.0",
|
|
82
81
|
"file-loader": "^6.2.0",
|
|
83
82
|
"foundation-sites": "^6.6.3",
|
|
84
|
-
"husky": "^
|
|
85
|
-
"jest": "^
|
|
86
|
-
"lint-staged": "^
|
|
83
|
+
"husky": "^6.0.0",
|
|
84
|
+
"jest": "^27.0.4",
|
|
85
|
+
"lint-staged": "^11.0.0",
|
|
87
86
|
"material-components-web": "^8.0.0",
|
|
88
|
-
"memfs": "^3.2.
|
|
89
|
-
"node-sass": "^
|
|
87
|
+
"memfs": "^3.2.2",
|
|
88
|
+
"node-sass": "^6.0.0",
|
|
90
89
|
"node-sass-glob-importer": "^5.3.2",
|
|
91
90
|
"npm-run-all": "^4.1.5",
|
|
92
|
-
"prettier": "^2.
|
|
93
|
-
"sass": "^1.
|
|
94
|
-
"semver": "^7.3.
|
|
95
|
-
"standard-version": "^9.
|
|
91
|
+
"prettier": "^2.3.1",
|
|
92
|
+
"sass": "^1.34.1",
|
|
93
|
+
"semver": "^7.3.5",
|
|
94
|
+
"standard-version": "^9.3.0",
|
|
96
95
|
"style-loader": "^2.0.0",
|
|
97
|
-
"webpack": "^5.
|
|
96
|
+
"webpack": "^5.38.1"
|
|
98
97
|
},
|
|
99
98
|
"keywords": [
|
|
100
99
|
"sass",
|
package/CHANGELOG.md
DELETED
|
@@ -1,567 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
### [11.0.1](https://github.com/webpack-contrib/sass-loader/compare/v11.0.0...v11.0.1) (2021-02-08)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
* compatibility with custom importers for `node-sass` ([#927](https://github.com/webpack-contrib/sass-loader/issues/927)) ([af5a072](https://github.com/webpack-contrib/sass-loader/commit/af5a072c5170f96f3d0643dec658248d98f65ff7))
|
|
11
|
-
|
|
12
|
-
## [11.0.0](https://github.com/webpack-contrib/sass-loader/compare/v10.1.1...v11.0.0) (2021-02-05)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Notes
|
|
16
|
-
|
|
17
|
-
* using `~` is deprecated and can be removed from your code (**we recommend it**), but we still support it for historical reasons.
|
|
18
|
-
|
|
19
|
-
Why you can removed it?
|
|
20
|
-
The loader will first try to resolve `@import`/`@use` as relative, if it cannot be resolved, the loader will try to resolve `@import`/`@use` inside [`node_modules`](https://webpack.js.org/configuration/resolve/#resolve-modules).
|
|
21
|
-
|
|
22
|
-
### ⚠ BREAKING CHANGES
|
|
23
|
-
|
|
24
|
-
* minimum supported `webpack` version is `5`
|
|
25
|
-
|
|
26
|
-
### Features
|
|
27
|
-
|
|
28
|
-
* supported the [`resolve.byDependency`](https://webpack.js.org/configuration/resolve/#resolvebydependency) option, you can setup `{ resolve: { byDependency: { sass: { mainFiles: ['custom', '...'] } } } }`
|
|
29
|
-
|
|
30
|
-
### [10.1.1](https://github.com/webpack-contrib/sass-loader/compare/v10.1.0...v10.1.1) (2021-01-11)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Bug Fixes
|
|
34
|
-
|
|
35
|
-
* problem with resolving and the `includePaths` option ([#913](https://github.com/webpack-contrib/sass-loader/issues/913)) ([cadc75e](https://github.com/webpack-contrib/sass-loader/commit/cadc75e80caf7d32ea47de1cbaab639f9204c0eb))
|
|
36
|
-
|
|
37
|
-
## [10.1.0](https://github.com/webpack-contrib/sass-loader/compare/v10.0.5...v10.1.0) (2020-11-11)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Features
|
|
41
|
-
|
|
42
|
-
* allow the `additionalData` to be async ([#902](https://github.com/webpack-contrib/sass-loader/issues/902)) ([9d925ff](https://github.com/webpack-contrib/sass-loader/commit/9d925ff794e1e4cb9db253a6867bfa2405ec3428))
|
|
43
|
-
|
|
44
|
-
### [10.0.5](https://github.com/webpack-contrib/sass-loader/compare/v10.0.4...v10.0.5) (2020-11-02)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### Bug Fixes
|
|
48
|
-
|
|
49
|
-
* support node-sass v5.0.0 ([#899](https://github.com/webpack-contrib/sass-loader/issues/899)) ([c3e279f](https://github.com/webpack-contrib/sass-loader/commit/c3e279fb4668fce4c597a6c8cd1d0f2ff8bc95e5))
|
|
50
|
-
|
|
51
|
-
### [10.0.4](https://github.com/webpack-contrib/sass-loader/compare/v10.0.3...v10.0.4) (2020-10-22)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
* compatibility with the filesystem cache ([#896](https://github.com/webpack-contrib/sass-loader/issues/896)) ([e31f9b6](https://github.com/webpack-contrib/sass-loader/commit/e31f9b682f62e957fd2075582c3cf6cf0daf6b52))
|
|
57
|
-
|
|
58
|
-
### [10.0.3](https://github.com/webpack-contrib/sass-loader/compare/v10.0.2...v10.0.3) (2020-10-09)
|
|
59
|
-
|
|
60
|
-
### Chore
|
|
61
|
-
|
|
62
|
-
* update `schema-utils`
|
|
63
|
-
|
|
64
|
-
### [10.0.2](https://github.com/webpack-contrib/sass-loader/compare/v10.0.1...v10.0.2) (2020-09-03)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### Bug Fixes
|
|
68
|
-
|
|
69
|
-
* source maps generation ([#886](https://github.com/webpack-contrib/sass-loader/issues/886)) ([8327d55](https://github.com/webpack-contrib/sass-loader/commit/8327d55df9e8fc6e24d2759d7bd50174ed1ff1e4))
|
|
70
|
-
|
|
71
|
-
### [10.0.1](https://github.com/webpack-contrib/sass-loader/compare/v10.0.0...v10.0.1) (2020-08-25)
|
|
72
|
-
|
|
73
|
-
### Chore
|
|
74
|
-
|
|
75
|
-
* update deps
|
|
76
|
-
|
|
77
|
-
## [10.0.0](https://github.com/webpack-contrib/sass-loader/compare/v10.0.0-rc.0...v10.0.0) (2020-08-24)
|
|
78
|
-
|
|
79
|
-
### Bug Fixes
|
|
80
|
-
|
|
81
|
-
* handle absolute windows path in source maps
|
|
82
|
-
|
|
83
|
-
## [10.0.0-rc.0](https://github.com/webpack-contrib/sass-loader/compare/v9.0.3...v10.0.0-rc.0) (2020-08-24)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
### ⚠ BREAKING CHANGES
|
|
87
|
-
|
|
88
|
-
* loader generates absolute `sources` in source maps, also avoids modifying `sass` source maps if the `sourceMap` option is `false`
|
|
89
|
-
|
|
90
|
-
### [9.0.3](https://github.com/webpack-contrib/sass-loader/compare/v9.0.2...v9.0.3) (2020-08-05)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### Bug Fixes
|
|
94
|
-
|
|
95
|
-
* resolution algorithm ([#875](https://github.com/webpack-contrib/sass-loader/issues/875)) ([ea73cfa](https://github.com/webpack-contrib/sass-loader/commit/ea73cfab047c751e1055d0c2ec58ef503f7dbe36))
|
|
96
|
-
|
|
97
|
-
### [9.0.2](https://github.com/webpack-contrib/sass-loader/compare/v9.0.1...v9.0.2) (2020-07-07)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### Bug Fixes
|
|
101
|
-
|
|
102
|
-
* resolution algorithm for `node-sass` ([#866](https://github.com/webpack-contrib/sass-loader/issues/866)) ([4584c90](https://github.com/webpack-contrib/sass-loader/commit/4584c9054befbc56661e2781a55df96fb9f94673))
|
|
103
|
-
|
|
104
|
-
### [9.0.1](https://github.com/webpack-contrib/sass-loader/compare/v9.0.0...v9.0.1) (2020-07-03)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### Bug Fixes
|
|
108
|
-
|
|
109
|
-
* do not crash on errors ([#860](https://github.com/webpack-contrib/sass-loader/issues/860)) ([e854933](https://github.com/webpack-contrib/sass-loader/commit/e8549330f8d9373ff8baccffbfd3e0c3b6f3ef61))
|
|
110
|
-
|
|
111
|
-
## [9.0.0](https://github.com/webpack-contrib/sass-loader/compare/v8.0.2...v9.0.0) (2020-07-02)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### ⚠ BREAKING CHANGES
|
|
115
|
-
|
|
116
|
-
* minimum supported Nodejs version is `10.13`
|
|
117
|
-
* prefer `sass` (`dart-sass`) by default, it is strongly recommended to migrate on `sass` (`dart-sass`)
|
|
118
|
-
* the `prependData` option was removed in favor the `additionalData` option, see [docs](https://github.com/webpack-contrib/sass-loader#additionaldata)
|
|
119
|
-
* when the `sourceMap` is `true`, `sassOptions.sourceMap`, `sassOptions.sourceMapContents`, `sassOptions.sourceMapEmbed`, `sassOptions.sourceMapRoot` and `sassOptions.omitSourceMapUrl` will be ignored.
|
|
120
|
-
|
|
121
|
-
### Features
|
|
122
|
-
|
|
123
|
-
* pass the loader context to custom importers under the `this.webpackLoaderContext` property ([#853](https://github.com/webpack-contrib/sass-loader/issues/853)) ([d487683](https://github.com/webpack-contrib/sass-loader/commit/d487683221fcd1e5a173e083b4b40644751c8cb1))
|
|
124
|
-
* supports for `process.cwd()` resolution logic by default ([#837](https://github.com/webpack-contrib/sass-loader/issues/837)) ([0c8d3b3](https://github.com/webpack-contrib/sass-loader/commit/0c8d3b3fb1cf371779b4a886cfc4e60facf68759))
|
|
125
|
-
* supports for `SASS-PATH` env variable resolution logic by default ([#836](https://github.com/webpack-contrib/sass-loader/issues/836)) ([8376179](https://github.com/webpack-contrib/sass-loader/commit/83761798380dcccc5a2badde3b3affe2bac385e8))
|
|
126
|
-
* supports for the `sass` property for the `exports` field from `package.json` (conditional exports, for more information read [docs](https://nodejs.org/api/esm.html))
|
|
127
|
-
|
|
128
|
-
### Bug Fixes
|
|
129
|
-
|
|
130
|
-
* avoid different content on different os ([#832](https://github.com/webpack-contrib/sass-loader/issues/832)) ([68dd278](https://github.com/webpack-contrib/sass-loader/commit/68dd27883ce0536adc5bc170816242c67fb118ff))
|
|
131
|
-
* resolution logic when the `includePaths` option used was improved ([#827](https://github.com/webpack-contrib/sass-loader/issues/827)) ([cbe5ad4](https://github.com/webpack-contrib/sass-loader/commit/cbe5ad407582a617be097d3eadd3ad8619e52507))
|
|
132
|
-
* resolution logic for `file://` scheme was improved ([17832fd](https://github.com/webpack-contrib/sass-loader/commit/17832fdb11f91593f4e2995003d67aebefb3be90))
|
|
133
|
-
* resolution logic for absolute paths and server relative URLs was improved
|
|
134
|
-
* source maps generation was improved
|
|
135
|
-
|
|
136
|
-
### [8.0.2](https://github.com/webpack-contrib/sass-loader/compare/v8.0.1...v8.0.2) (2020-01-13)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### Bug Fixes
|
|
140
|
-
|
|
141
|
-
* compatibility with node@8 ([#798](https://github.com/webpack-contrib/sass-loader/issues/798)) ([6f3852f](https://github.com/webpack-contrib/sass-loader/commit/6f3852f7d393dd0bc8f8d264d81ecc941bc72511))
|
|
142
|
-
|
|
143
|
-
### [8.0.1](https://github.com/webpack-contrib/sass-loader/compare/v8.0.0...v8.0.1) (2020-01-10)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### Bug Fixes
|
|
147
|
-
|
|
148
|
-
* support webpack@5 ([#794](https://github.com/webpack-contrib/sass-loader/issues/794)) ([6c59e37](https://github.com/webpack-contrib/sass-loader/commit/6c59e37e3f67668d7a3908444ddfc0176bc5601f))
|
|
149
|
-
|
|
150
|
-
## [8.0.0](https://github.com/webpack-contrib/sass-loader/compare/v7.3.1...v8.0.0) (2019-08-29)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### ⚠ BREAKING CHANGES
|
|
154
|
-
|
|
155
|
-
* minimum required `webpack` version is `4.36.0`
|
|
156
|
-
* minimum required `node.js` version is `8.9.0`
|
|
157
|
-
* move all sass (`includePaths`, `importer`, `functions`, `outputStyle`) options to the `sassOptions` option. The `functions` option can't be used as `Function`, you should use `sassOption` as `Function` to achieve this.
|
|
158
|
-
* the `data` option was renamed to the `prependData` option
|
|
159
|
-
* default value of the `sourceMap` option depends on the `devtool` value (`eval`/`false` values don't enable source map generation)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### Features
|
|
163
|
-
|
|
164
|
-
* automatically use the `fibers` package if it is possible ([#744](https://github.com/webpack-contrib/sass-loader/issues/744)) ([96184e1](https://github.com/webpack-contrib/sass-loader/commit/96184e1))
|
|
165
|
-
* source map generation depends on the `devtool` option ([#743](https://github.com/webpack-contrib/sass-loader/issues/743)) ([fcea88e](https://github.com/webpack-contrib/sass-loader/commit/fcea88e))
|
|
166
|
-
* validate loader options ([#737](https://github.com/webpack-contrib/sass-loader/issues/737)) ([7b543fc](https://github.com/webpack-contrib/sass-loader/commit/7b543fc))
|
|
167
|
-
* reworked error handling from `node-sass`/`sass`
|
|
168
|
-
* improve resolution for `@import` (including support `_index` and `index` files in a directory)
|
|
169
|
-
|
|
170
|
-
### Bug Fixes
|
|
171
|
-
|
|
172
|
-
* compatibility with `pnp`
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
### [7.3.1](https://github.com/webpack-contrib/sass-loader/compare/v7.3.0...v7.3.1) (2019-08-20)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Bug Fixes
|
|
179
|
-
|
|
180
|
-
* minimum `node` version in `package.json` ([#733](https://github.com/webpack-contrib/sass-loader/issues/733)) ([1175920](https://github.com/webpack-contrib/sass-loader/commit/1175920))
|
|
181
|
-
|
|
182
|
-
## [7.3.0](https://github.com/webpack-contrib/sass-loader/compare/v7.2.0...v7.3.0) (2019-08-20)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
### Bug Fixes
|
|
186
|
-
|
|
187
|
-
* handle module import ending `/` as module ([#728](https://github.com/webpack-contrib/sass-loader/issues/728)) ([997a255](https://github.com/webpack-contrib/sass-loader/commit/997a255))
|
|
188
|
-
* resolution algorithm ([#720](https://github.com/webpack-contrib/sass-loader/issues/720)) ([0e94940](https://github.com/webpack-contrib/sass-loader/commit/0e94940))
|
|
189
|
-
* use "compressed" output when mode is "production" ([#723](https://github.com/webpack-contrib/sass-loader/issues/723)) ([b2af379](https://github.com/webpack-contrib/sass-loader/commit/b2af379))
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### Features
|
|
193
|
-
|
|
194
|
-
* `webpackImporter` option ([#732](https://github.com/webpack-contrib/sass-loader/issues/732)) ([6f4ea37](https://github.com/webpack-contrib/sass-loader/commit/6f4ea37))
|
|
195
|
-
|
|
196
|
-
<a name="7.2.0"></a>
|
|
197
|
-
# [7.2.0](https://github.com/webpack-contrib/sass-loader/compare/v7.1.0...v7.2.0) (2019-08-08)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### Bug Fixes
|
|
201
|
-
|
|
202
|
-
* better handle stdin in sources ([#681](https://github.com/webpack-contrib/sass-loader/issues/681)) ([e279f2a](https://github.com/webpack-contrib/sass-loader/commit/e279f2a))
|
|
203
|
-
* prefer `sass`/`scss`/`css` extensions ([#711](https://github.com/webpack-contrib/sass-loader/issues/711)) ([6fc9d4e](https://github.com/webpack-contrib/sass-loader/commit/6fc9d4e))
|
|
204
|
-
* relax node engine ([#708](https://github.com/webpack-contrib/sass-loader/issues/708)) ([2a51502](https://github.com/webpack-contrib/sass-loader/commit/2a51502))
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
### Features
|
|
208
|
-
|
|
209
|
-
* allow passing `functions` option as function ([#651](https://github.com/webpack-contrib/sass-loader/issues/651)) ([6c9654d](https://github.com/webpack-contrib/sass-loader/commit/6c9654d))
|
|
210
|
-
* support `data` as `Function` ([#648](https://github.com/webpack-contrib/sass-loader/issues/648)) ([aa64e1b](https://github.com/webpack-contrib/sass-loader/commit/aa64e1b))
|
|
211
|
-
* support `sass` and `style` fields in `package.json` ([#647](https://github.com/webpack-contrib/sass-loader/issues/647)) ([a8709c9](https://github.com/webpack-contrib/sass-loader/commit/a8709c9))
|
|
212
|
-
* support auto resolving `dart-sass` ([ff90dd6](https://github.com/webpack-contrib/sass-loader/commit/ff90dd6))
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
<a name="7.1.0"></a>
|
|
217
|
-
# [7.1.0](https://github.com/webpack-contrib/sass-loader/compare/v7.0.3...v7.1.0) (2018-08-01)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
### Features
|
|
221
|
-
|
|
222
|
-
* Make this package implementation-agnostic (#573) ([bed9fb5](https://github.com/webpack-contrib/sass-loader/commit/bed9fb5)), closes [#435](https://github.com/webpack-contrib/sass-loader/issues/435)
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
<a name="7.0.3"></a>
|
|
227
|
-
## [7.0.3](https://github.com/webpack-contrib/sass-loader/compare/v7.0.2...v7.0.3) (2018-06-05)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
### Bug Fixes
|
|
231
|
-
|
|
232
|
-
* Bare imports not working sometimes (#579) ([c348281](https://github.com/webpack-contrib/sass-loader/commit/c348281)), closes [#566](https://github.com/webpack-contrib/sass-loader/issues/566)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<a name="7.0.2"></a>
|
|
237
|
-
## [7.0.2](https://github.com/webpack-contrib/sass-loader/compare/v7.0.1...v7.0.2) (2018-06-02)
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
### Bug Fixes
|
|
241
|
-
|
|
242
|
-
* Errors being swallowed when trying to load node-sass (#576) ([6dfb274](https://github.com/webpack-contrib/sass-loader/commit/6dfb274)), closes [#563](https://github.com/webpack-contrib/sass-loader/issues/563)
|
|
243
|
-
* Report error to user for problems loading node-sass (#562) ([2529c07](https://github.com/webpack-contrib/sass-loader/commit/2529c07))
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<a name="7.0.1"></a>
|
|
248
|
-
## [7.0.1](https://github.com/webpack-contrib/sass-loader/compare/v7.0.0...v7.0.1) (2018-04-13)
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
### Bug Fixes
|
|
252
|
-
|
|
253
|
-
* Wrong import precedence (#557) ([f4eeff1](https://github.com/webpack-contrib/sass-loader/commit/f4eeff1))
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<a name="7.0.0"></a>
|
|
258
|
-
# [7.0.0](https://github.com/webpack-contrib/sass-loader/compare/v6.0.7...v7.0.0) (2018-04-13)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
### Features
|
|
262
|
-
|
|
263
|
-
* Refactor resolving and simplify webpack config aliases (#479) ([e0fde1a](https://github.com/webpack-contrib/sass-loader/commit/e0fde1a))
|
|
264
|
-
* Remove `node-sass` from `peerDependencies` (#533) ([6439cef](https://github.com/webpack-contrib/sass-loader/commit/6439cef))
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
### BREAKING CHANGES
|
|
268
|
-
|
|
269
|
-
* Drop official node 4 support
|
|
270
|
-
* This slightly changes the resolving algorithm. Should not break in normal usage, but might break in complex configurations.
|
|
271
|
-
* The sass-loader throws an error at runtime now and refuses to compile if the peer dependency is wrong. This could break applications where npm's peer dependency warning was just ignored.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<a name="6.0.7"></a>
|
|
276
|
-
## [6.0.7](https://github.com/webpack-contrib/sass-loader/compare/v6.0.6...v6.0.7) (2018-03-03)
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
### Bug Fixes
|
|
280
|
-
|
|
281
|
-
* **package:** add `webpack >= v4.0.0` (`peerDependencies`) ([#541](https://github.com/webpack-contrib/sass-loader/issues/541)) ([620bdd4](https://github.com/webpack-contrib/sass-loader/commit/620bdd4))
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
### Performance Improvements
|
|
285
|
-
|
|
286
|
-
* use `neo-async` instead `async` ([#538](https://github.com/webpack-contrib/sass-loader/issues/538)) ([fab89dc](https://github.com/webpack-contrib/sass-loader/commit/fab89dc))
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<a name="6.0.6"></a>
|
|
291
|
-
## [6.0.6](https://github.com/webpack-contrib/sass-loader/compare/v6.0.5...v6.0.6) (2017-06-14)
|
|
292
|
-
|
|
293
|
-
### Chore
|
|
294
|
-
|
|
295
|
-
* Adds Webpack 3.x version range to peerDependencies
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
<a name="6.0.5"></a>
|
|
299
|
-
# [6.0.5](https://github.com/webpack-contrib/sass-loader/compare/v6.0.5...v6.0.4) (2017-05-10)
|
|
300
|
-
|
|
301
|
-
### Bug Fixes
|
|
302
|
-
|
|
303
|
-
* importing file directly from scoped npm package [#450](https://github.com/webpack-contrib/sass-loader/pull/450) ([5d06e9d](https://github.com/webpack-contrib/sass-loader/commit/5d06e9d))
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
<a name="6.0.4"></a>
|
|
307
|
-
# [6.0.4](https://github.com/webpack-contrib/sass-loader/compare/v6.0.4...v6.0.3) (2017-05-09)
|
|
308
|
-
|
|
309
|
-
### Bug Fixes
|
|
310
|
-
|
|
311
|
-
* fix: Resolving of scoped npm packages [#447](https://github.com/webpack-contrib/sass-loader/pull/447)
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<a name="6.0.3"></a>
|
|
315
|
-
# [6.0.3](https://github.com/webpack-contrib/sass-loader/compare/v6.0.3...v6.0.2) (2017-03-07)
|
|
316
|
-
|
|
317
|
-
### Bug Fixes
|
|
318
|
-
|
|
319
|
-
* Fix regression with empty files [#398](https://github.com/webpack-contrib/sass-loader/pull/398)
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
### Chore
|
|
323
|
-
|
|
324
|
-
* Reduce npm package size by using the [files](https://docs.npmjs.com/files/package.json#files) property in the `package.json`
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
<a name="6.0.2"></a>
|
|
328
|
-
# [6.0.2](https://github.com/webpack-contrib/sass-loader/compare/v6.0.2...v6.0.1) (2017-02-21)
|
|
329
|
-
|
|
330
|
-
### Chore
|
|
331
|
-
|
|
332
|
-
* Update dependencies [#383](https://github.com/webpack-contrib/sass-loader/pull/383)
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<a name="6.0.1"></a>
|
|
336
|
-
# [6.0.1](https://github.com/webpack-contrib/sass-loader/compare/v6.0.1...v6.0.0) (2017-02-17)
|
|
337
|
-
|
|
338
|
-
### Bug Fixes
|
|
339
|
-
|
|
340
|
-
* Fix source maps in certain CWDs. [#377](https://github.com/webpack-contrib/sass-loader/pull/377)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
<a name="6.0.0"></a>
|
|
344
|
-
# [6.0.0](https://github.com/webpack-contrib/sass-loader/compare/v6.0.0...v5.0.1) (2017-02-13)
|
|
345
|
-
|
|
346
|
-
### Bug Fixes
|
|
347
|
-
|
|
348
|
-
* Improve source map support. [#374](https://github.com/webpack-contrib/sass-loader/issues/374)
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
### BREAKING CHANGES
|
|
352
|
-
|
|
353
|
-
* This is breaking for the resolve-url-loader
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
<a name="5.0.1"></a>
|
|
357
|
-
# [5.0.1](https://github.com/webpack-contrib/sass-loader/compare/v5.0.1...v5.0.0) (2017-02-13)
|
|
358
|
-
|
|
359
|
-
### Bug Fixes
|
|
360
|
-
|
|
361
|
-
* Fix bug where multiple compilations interfered with each other. [#369](https://github.com/webpack-contrib/sass-loader/pull/369)
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
<a name="5.0.0"></a>
|
|
365
|
-
# [5.0.0](https://github.com/webpack-contrib/sass-loader/compare/v5.0.0...v4.1.1) (2017-02-13)
|
|
366
|
-
|
|
367
|
-
### Code Refactoring
|
|
368
|
-
|
|
369
|
-
* Remove synchronous compilation support [#334](https://github.com/webpack-contrib/sass-loader/pull/334)
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
### BREAKING CHANGES
|
|
373
|
-
|
|
374
|
-
* Remove node 0.12 support. [29b30755021a834e622bf4b5bb9db4d6e5913905](https://github.com/webpack-contrib/sass-loader/commit/29b30755021a834e622bf4b5bb9db4d6e5913905)
|
|
375
|
-
* Remove official node-sass@3 and webpack@1 support. [5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5](https://github.com/webpack-contrib/sass-loader/commit/5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5)
|
|
376
|
-
* Remove synchronous compilation support. [#334](https://github.com/webpack-contrib/sass-loader/pull/334)
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
<a name="4.1.1"></a>
|
|
380
|
-
# [4.1.1](https://github.com/webpack-contrib/sass-loader/compare/v4.1.1...v4.1.0) (2016-12-21)
|
|
381
|
-
|
|
382
|
-
### Chore
|
|
383
|
-
|
|
384
|
-
* Update webpack peer dependency to support 2.2.0rc. [#330](https://github.com/webpack-contrib/sass-loader/pull/330)
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
<a name="4.1.0"></a>
|
|
388
|
-
# [4.1.0](https://github.com/webpack-contrib/sass-loader/compare/v4.1.0...v4.0.2) (2016-12-14)
|
|
389
|
-
|
|
390
|
-
### Features
|
|
391
|
-
|
|
392
|
-
* Update `node-sass@4.0.0` [#319](https://github.com/webpack-contrib/sass-loader/pull/319)
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
<a name="4.0.2"></a>
|
|
396
|
-
# [4.0.2](https://github.com/webpack-contrib/sass-loader/compare/v4.0.2...v4.0.1) (2016-07-07)
|
|
397
|
-
|
|
398
|
-
### Bug Fixes
|
|
399
|
-
|
|
400
|
-
* Fix wrong context in customImporters [#281](https://github.com/webpack-contrib/sass-loader/pull/281)
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
<a name="4.0.1"></a>
|
|
404
|
-
# [4.0.1](https://github.com/webpack-contrib/sass-loader/compare/v4.0.1...v4.0.0) (2016-07-01)
|
|
405
|
-
|
|
406
|
-
### Bug Fixes
|
|
407
|
-
|
|
408
|
-
* Fix custom importers receiving `'stdin'` as second argument instead of the actual `resourcePath` [#267](https://github.com/webpack-contrib/sass-loader/pull/267)
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
<a name="4.0.0"></a>
|
|
412
|
-
# [4.0.0](https://github.com/webpack-contrib/sass-loader/compare/v4.0.0...v3.2.2) (2016-06-27)
|
|
413
|
-
|
|
414
|
-
### Bug Fixes
|
|
415
|
-
|
|
416
|
-
* Fix incorrect source map paths [#250](https://github.com/webpack-contrib/sass-loader/pull/250)
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
### BREAKING CHANGES
|
|
420
|
-
|
|
421
|
-
* Release new major version because the previous release was a breaking change in certain scenarios
|
|
422
|
-
See: https://github.com/webpack-contrib/sass-loader/pull/250#issuecomment-228663059
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
<a name="3.2.2"></a>
|
|
426
|
-
# [3.2.2](https://github.com/webpack-contrib/sass-loader/compare/v3.2.2...v3.2.1) (2016-06-26)
|
|
427
|
-
|
|
428
|
-
### Bug Fixes
|
|
429
|
-
|
|
430
|
-
* Fix incorrect source map paths [#250](https://github.com/webpack-contrib/sass-loader/pull/250)
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
<a name="3.2.1"></a>
|
|
434
|
-
# [3.2.1](https://github.com/webpack-contrib/sass-loader/compare/v3.2.1...v3.2.0) (2016-06-19)
|
|
435
|
-
|
|
436
|
-
### Bug Fixes
|
|
437
|
-
|
|
438
|
-
* Add `webpack@^2.1.0-beta` as peer dependency [#233](https://github.com/webpack-contrib/sass-loader/pull/233)
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
<a name="3.2.0"></a>
|
|
442
|
-
# [3.2.0](https://github.com/webpack-contrib/sass-loader/compare/v3.2.0...v3.1.2) (2016-03-12)
|
|
443
|
-
|
|
444
|
-
### Features
|
|
445
|
-
|
|
446
|
-
* Append file content instead of overwriting when `data`-option is already present [#216](https://github.com/webpack-contrib/sass-loader/pull/216)
|
|
447
|
-
* Make `indentedSyntax` option a bit smarter [#196](https://github.com/webpack-contrib/sass-loader/pull/196)
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
<a name="3.1.2"></a>
|
|
451
|
-
# [3.1.2](https://github.com/webpack-contrib/sass-loader/compare/v3.1.2...v3.1.1) (2015-11-22)
|
|
452
|
-
|
|
453
|
-
### Bug Fixes
|
|
454
|
-
|
|
455
|
-
* Fix loader query not overriding webpack config [#189](https://github.com/webpack-contrib/sass-loader/pull/189)
|
|
456
|
-
* Update peer-dependencies [#182](https://github.com/webpack-contrib/sass-loader/pull/182)
|
|
457
|
-
- `node-sass^3.4.2`
|
|
458
|
-
- `webpack^1.12.6`
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
<a name="3.1.1"></a>
|
|
462
|
-
# [3.1.1](https://github.com/webpack-contrib/sass-loader/compare/v3.1.1...v3.1.0) (2015-10-26)
|
|
463
|
-
|
|
464
|
-
### Bug Fixes
|
|
465
|
-
|
|
466
|
-
* Fix missing module `object-assign` [#178](https://github.com/webpack-contrib/sass-loader/issues/178)
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
<a name="3.1.0"></a>
|
|
470
|
-
# [3.1.0](https://github.com/webpack-contrib/sass-loader/compare/v3.1.0...v3.0.0) (2015-10-25)
|
|
471
|
-
|
|
472
|
-
### Bug Fixes
|
|
473
|
-
|
|
474
|
-
* Fix a problem where modules with a `.` in their names were not resolved [#167](https://github.com/webpack-contrib/sass-loader/issues/167)
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
### Features
|
|
478
|
-
|
|
479
|
-
* Add possibility to also define all options in your `webpack.config.js` [#152](https://github.com/webpack-contrib/sass-loader/pull/152) [#170](https://github.com/webpack-contrib/sass-loader/pull/170)
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
<a name="3.0.0"></a>
|
|
483
|
-
# [3.0.0](https://github.com/webpack-contrib/sass-loader/compare/v3.0.0...v2.0.1) (2015-09-29)
|
|
484
|
-
|
|
485
|
-
### Bug Fixes
|
|
486
|
-
|
|
487
|
-
* Fix crash when Sass reported an error without `file` [#158](https://github.com/webpack-contrib/sass-loader/pull/158)
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
### BREAKING CHANGES
|
|
491
|
-
|
|
492
|
-
* Add `node-sass@^3.3.3` and `webpack@^1.12.2` as peer-dependency [#165](https://github.com/webpack-contrib/sass-loader/pull/165) [#166](https://github.com/webpack-contrib/sass-loader/pull/166) [#169](https://github.com/webpack-contrib/sass-loader/pull/169)
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
<a name="2.0.1"></a>
|
|
496
|
-
# [2.0.1](https://github.com/webpack-contrib/sass-loader/compare/v2.0.1...v2.0.0) (2015-08-14)
|
|
497
|
-
|
|
498
|
-
### Bug Fixes
|
|
499
|
-
|
|
500
|
-
* Add missing path normalization (fixes [#141](https://github.com/webpack-contrib/sass-loader/pull/141))
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
<a name="2.0.0"></a>
|
|
504
|
-
# [2.0.0](https://github.com/webpack-contrib/sass-loader/compare/v2.0.0...v1.0.4) (2015-08-06)
|
|
505
|
-
|
|
506
|
-
### Bug Fixes
|
|
507
|
-
|
|
508
|
-
* Add temporary fix for stuck processes (see [sass/node-sass#857](https://github.com/sass/node-sass/issues/857)) [#100](https://github.com/webpack-contrib/sass-loader/issues/100) [#119](https://github.com/webpack-contrib/sass-loader/issues/119) [#132](https://github.com/webpack-contrib/sass-loader/pull/132)
|
|
509
|
-
* Fix path resolving on Windows [#108](https://github.com/webpack-contrib/sass-loader/issues/108)
|
|
510
|
-
* Fix file watchers on Windows [#102](https://github.com/webpack-contrib/sass-loader/issues/102)
|
|
511
|
-
* Fix file watchers for files with errors [#134](https://github.com/webpack-contrib/sass-loader/pull/134)
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
### Code Refactoring
|
|
515
|
-
|
|
516
|
-
* Refactor [import resolving algorithm](https://github.com/webpack-contrib/sass-loader/blob/089c52dc9bd02ec67fb5c65c2c226f43710f231c/index.js#L293-L348). ([#138](https://github.com/webpack-contrib/sass-loader/issues/138)) ([c8621a1](https://github.com/webpack-contrib/sass-loader/commit/80944ccf09cd9716a100160c068d255c5d742338))
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
### BREAKING CHANGES
|
|
520
|
-
|
|
521
|
-
* The new algorithm is aligned to libsass' way of resolving files. This yields to different results if two files with the same path and filename but with different extensions are present. Though this change should be no problem for most users, we must flag it as breaking change. [#135](https://github.com/webpack-contrib/sass-loader/issues/135) [#138](https://github.com/webpack-contrib/sass-loader/issues/138)
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
<a name="1.0.4"></a>
|
|
525
|
-
# [1.0.4](https://github.com/webpack-contrib/sass-loader/compare/v1.0.4...v1.0.3) (2015-08-03)
|
|
526
|
-
|
|
527
|
-
### Bug Fixes
|
|
528
|
-
|
|
529
|
-
* Fix wrong source-map urls [#123](https://github.com/webpack-contrib/sass-loader/pull/123)
|
|
530
|
-
* Include source-map contents by default [#104](https://github.com/webpack-contrib/sass-loader/pull/104)
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<a name="1.0.3"></a>
|
|
534
|
-
# [1.0.3](https://github.com/webpack-contrib/sass-loader/compare/v1.0.3...v1.0.2) (2015-07-22)
|
|
535
|
-
|
|
536
|
-
### Bug Fixes
|
|
537
|
-
|
|
538
|
-
* Fix importing css files from scss/sass [#101](https://github.com/webpack-contrib/sass-loader/issues/101)
|
|
539
|
-
* Fix importing Sass partials from includePath [#98](https://github.com/webpack-contrib/sass-loader/issues/98) [#110](https://github.com/webpack-contrib/sass-loader/issues/110)
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
<a name="1.0.2"></a>
|
|
543
|
-
# [1.0.2](https://github.com/webpack-contrib/sass-loader/compare/v1.0.2...v1.0.1) (2015-04-15)
|
|
544
|
-
|
|
545
|
-
### Bug Fixes
|
|
546
|
-
|
|
547
|
-
* Fix a bug where files could not be imported across language styles [#73](https://github.com/webpack-contrib/sass-loader/issues/73)
|
|
548
|
-
* Update peer-dependency `node-sass` to `3.1.0`
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
<a name="1.0.1"></a>
|
|
552
|
-
# [1.0.1](https://github.com/webpack-contrib/sass-loader/compare/v1.0.1...v1.0.0) (2015-03-31)
|
|
553
|
-
|
|
554
|
-
### Bug Fixes
|
|
555
|
-
|
|
556
|
-
* Fix Sass partials not being resolved anymore [#68](https://github.com/webpack-contrib/sass-loader/issues/68)
|
|
557
|
-
* Update peer-dependency `node-sass` to `3.0.0-beta.4`
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
<a name="1.0.0"></a>
|
|
561
|
-
# [1.0.0](https://github.com/webpack-contrib/sass-loader/compare/v1.0.0...v0.3.1) (2015-03-22)
|
|
562
|
-
|
|
563
|
-
### Bug Fixes
|
|
564
|
-
|
|
565
|
-
* Moved `node-sass^3.0.0-alpha.0` to `peerDependencies` [#28](https://github.com/webpack-contrib/sass-loader/issues/28)
|
|
566
|
-
* Using webpack's module resolver as custom importer [#39](https://github.com/webpack-contrib/sass-loader/issues/31)
|
|
567
|
-
* Add synchronous compilation support for usage with [enhanced-require](https://github.com/webpack/enhanced-require) [#39](https://github.com/webpack-contrib/sass-loader/pull/39)
|