sass-loader 12.1.0 → 12.2.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 +3 -1
- package/dist/options.json +10 -5
- package/dist/utils.js +6 -1
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -306,11 +306,13 @@ Default: defaults values for Sass implementation
|
|
|
306
306
|
|
|
307
307
|
Options for [Dart Sass](http://sass-lang.com/dart-sass) or [Node Sass](https://github.com/sass/node-sass) implementation.
|
|
308
308
|
|
|
309
|
+
> ℹ️ 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`.
|
|
310
|
+
|
|
309
311
|
> ℹ️ The `indentedSyntax` option has `true` value for the `sass` extension.
|
|
310
312
|
|
|
311
313
|
> ℹ️ Options such as `data` and `file` are unavailable and will be ignored.
|
|
312
314
|
|
|
313
|
-
> ℹ We
|
|
315
|
+
> ℹ We strongly discourage change `outFile`, `sourceMapContents`, `sourceMapEmbed`, `sourceMapRoot` options because `sass-loader` automatically sets these options when the `sourceMap` option is `true`.
|
|
314
316
|
|
|
315
317
|
> ℹ️ 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.
|
|
316
318
|
|
package/dist/options.json
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
5
|
"implementation": {
|
|
6
|
-
"description": "The implementation of the sass to be used
|
|
6
|
+
"description": "The implementation of the sass to be used.",
|
|
7
|
+
"link": "https://github.com/webpack-contrib/sass-loader#implementation",
|
|
7
8
|
"anyOf": [
|
|
8
9
|
{
|
|
9
10
|
"type": "string"
|
|
@@ -14,7 +15,8 @@
|
|
|
14
15
|
]
|
|
15
16
|
},
|
|
16
17
|
"sassOptions": {
|
|
17
|
-
"description": "Options for `node-sass` or `sass` (`Dart Sass`) implementation.
|
|
18
|
+
"description": "Options for `node-sass` or `sass` (`Dart Sass`) implementation.",
|
|
19
|
+
"link": "https://github.com/webpack-contrib/sass-loader#sassoptions",
|
|
18
20
|
"anyOf": [
|
|
19
21
|
{
|
|
20
22
|
"type": "object",
|
|
@@ -26,7 +28,8 @@
|
|
|
26
28
|
]
|
|
27
29
|
},
|
|
28
30
|
"additionalData": {
|
|
29
|
-
"description": "Prepends/Appends `Sass`/`SCSS` code before the actual entry file
|
|
31
|
+
"description": "Prepends/Appends `Sass`/`SCSS` code before the actual entry file.",
|
|
32
|
+
"link": "https://github.com/webpack-contrib/sass-loader#additionaldata",
|
|
30
33
|
"anyOf": [
|
|
31
34
|
{
|
|
32
35
|
"type": "string"
|
|
@@ -37,11 +40,13 @@
|
|
|
37
40
|
]
|
|
38
41
|
},
|
|
39
42
|
"sourceMap": {
|
|
40
|
-
"description": "Enables/Disables generation of source maps
|
|
43
|
+
"description": "Enables/Disables generation of source maps.",
|
|
44
|
+
"link": "https://github.com/webpack-contrib/sass-loader#sourcemap",
|
|
41
45
|
"type": "boolean"
|
|
42
46
|
},
|
|
43
47
|
"webpackImporter": {
|
|
44
|
-
"description": "Enables/Disables default `webpack` importer
|
|
48
|
+
"description": "Enables/Disables default `webpack` importer.",
|
|
49
|
+
"link": "https://github.com/webpack-contrib/sass-loader#webpackimporter",
|
|
45
50
|
"type": "boolean"
|
|
46
51
|
}
|
|
47
52
|
},
|
package/dist/utils.js
CHANGED
|
@@ -161,7 +161,7 @@ async function getSassOptions(loaderContext, loaderOptions, content, implementat
|
|
|
161
161
|
options.file = loaderContext.resourcePath;
|
|
162
162
|
options.data = loaderOptions.additionalData ? typeof loaderOptions.additionalData === "function" ? await loaderOptions.additionalData(content, loaderContext) : `${loaderOptions.additionalData}\n${content}` : content; // opt.outputStyle
|
|
163
163
|
|
|
164
|
-
if (
|
|
164
|
+
if (typeof options.outputStyle === "undefined" && isProductionLikeMode(loaderContext)) {
|
|
165
165
|
options.outputStyle = "compressed";
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -196,6 +196,11 @@ async function getSassOptions(loaderContext, loaderOptions, content, implementat
|
|
|
196
196
|
options.importer = options.importer ? proxyCustomImporters(Array.isArray(options.importer) ? options.importer : [options.importer], loaderContext) : [];
|
|
197
197
|
options.includePaths = [].concat(process.cwd()).concat( // We use `includePaths` in context for resolver, so it should be always absolute
|
|
198
198
|
(options.includePaths || []).map(includePath => _path.default.isAbsolute(includePath) ? includePath : _path.default.join(process.cwd(), includePath))).concat(process.env.SASS_PATH ? process.env.SASS_PATH.split(process.platform === "win32" ? ";" : ":") : []);
|
|
199
|
+
|
|
200
|
+
if (typeof options.charset === "undefined") {
|
|
201
|
+
options.charset = true;
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
return options;
|
|
200
205
|
}
|
|
201
206
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-loader",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "Sass loader for webpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "webpack-contrib/sass-loader",
|
|
@@ -60,40 +60,40 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/cli": "^7.14.5",
|
|
63
|
-
"@babel/core": "^7.14.
|
|
64
|
-
"@babel/preset-env": "^7.14.
|
|
65
|
-
"@commitlint/cli": "^
|
|
66
|
-
"@commitlint/config-conventional": "^
|
|
63
|
+
"@babel/core": "^7.14.6",
|
|
64
|
+
"@babel/preset-env": "^7.14.7",
|
|
65
|
+
"@commitlint/cli": "^13.1.0",
|
|
66
|
+
"@commitlint/config-conventional": "^13.1.0",
|
|
67
67
|
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
|
|
68
|
-
"babel-jest": "^27.0.
|
|
68
|
+
"babel-jest": "^27.0.6",
|
|
69
69
|
"bootstrap-sass": "^3.4.1",
|
|
70
70
|
"bootstrap-v4": "npm:bootstrap@^4.5.3",
|
|
71
71
|
"bootstrap-v5": "npm:bootstrap@^5.0.1",
|
|
72
72
|
"cross-env": "^7.0.3",
|
|
73
|
-
"css-loader": "^
|
|
73
|
+
"css-loader": "^6.2.0",
|
|
74
74
|
"del": "^6.0.0",
|
|
75
|
-
"del-cli": "^
|
|
75
|
+
"del-cli": "^4.0.1",
|
|
76
76
|
"enhanced-resolve": "^5.8.2",
|
|
77
|
-
"eslint": "^7.
|
|
77
|
+
"eslint": "^7.30.0",
|
|
78
78
|
"eslint-config-prettier": "^8.3.0",
|
|
79
79
|
"eslint-plugin-import": "^2.23.3",
|
|
80
80
|
"fibers": "^5.0.0",
|
|
81
81
|
"file-loader": "^6.2.0",
|
|
82
82
|
"foundation-sites": "^6.6.3",
|
|
83
|
-
"husky": "^
|
|
84
|
-
"jest": "^27.0.
|
|
85
|
-
"lint-staged": "^11.0.
|
|
83
|
+
"husky": "^7.0.1",
|
|
84
|
+
"jest": "^27.0.6",
|
|
85
|
+
"lint-staged": "^11.0.1",
|
|
86
86
|
"material-components-web": "^8.0.0",
|
|
87
87
|
"memfs": "^3.2.2",
|
|
88
|
-
"node-sass": "^6.0.
|
|
88
|
+
"node-sass": "^6.0.1",
|
|
89
89
|
"node-sass-glob-importer": "^5.3.2",
|
|
90
90
|
"npm-run-all": "^4.1.5",
|
|
91
|
-
"prettier": "^2.3.
|
|
92
|
-
"sass": "^1.
|
|
91
|
+
"prettier": "^2.3.2",
|
|
92
|
+
"sass": "^1.35.2",
|
|
93
93
|
"semver": "^7.3.5",
|
|
94
|
-
"standard-version": "^9.3.
|
|
95
|
-
"style-loader": "^2.
|
|
96
|
-
"webpack": "^5.
|
|
94
|
+
"standard-version": "^9.3.1",
|
|
95
|
+
"style-loader": "^3.2.1",
|
|
96
|
+
"webpack": "^5.45.1"
|
|
97
97
|
},
|
|
98
98
|
"keywords": [
|
|
99
99
|
"sass",
|