@parcel/transformer-sass 2.9.3 → 2.10.1
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/lib/SassTransformer.js +7 -0
- package/package.json +4 -4
- package/src/SassTransformer.js +7 -0
package/lib/SassTransformer.js
CHANGED
|
@@ -59,6 +59,13 @@ var _default = new (_plugin().Transformer)({
|
|
|
59
59
|
});
|
|
60
60
|
let configResult = configFile ? configFile.contents : {};
|
|
61
61
|
|
|
62
|
+
// Some packages in the wild declare a field `sass` in the package.json that
|
|
63
|
+
// is a relative path to the sass entrypoint. In those cases we simply
|
|
64
|
+
// initialize the config to an empty object.
|
|
65
|
+
if (typeof configResult === 'string') {
|
|
66
|
+
configResult = {};
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
// Resolve relative paths from config file
|
|
63
70
|
if (configFile && configResult.includePaths) {
|
|
64
71
|
configResult.includePaths = configResult.includePaths.map(p => _path().default.resolve(_path().default.dirname(configFile.filePath), p));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-sass",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"source": "src/SassTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "^2.
|
|
20
|
+
"parcel": "^2.10.1"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.
|
|
23
|
+
"@parcel/plugin": "2.10.1",
|
|
24
24
|
"@parcel/source-map": "^2.1.1",
|
|
25
25
|
"sass": "^1.38.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "bba0417f68159b1f71c747cfd06fa3fe2dd374b5"
|
|
28
28
|
}
|
package/src/SassTransformer.js
CHANGED
|
@@ -20,6 +20,13 @@ export default (new Transformer({
|
|
|
20
20
|
|
|
21
21
|
let configResult = configFile ? configFile.contents : {};
|
|
22
22
|
|
|
23
|
+
// Some packages in the wild declare a field `sass` in the package.json that
|
|
24
|
+
// is a relative path to the sass entrypoint. In those cases we simply
|
|
25
|
+
// initialize the config to an empty object.
|
|
26
|
+
if (typeof configResult === 'string') {
|
|
27
|
+
configResult = {};
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
// Resolve relative paths from config file
|
|
24
31
|
if (configFile && configResult.includePaths) {
|
|
25
32
|
configResult.includePaths = configResult.includePaths.map(p =>
|