@parcel/transformer-less 2.0.0-nightly.1285 → 2.0.0-nightly.1289
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/loadConfig.js +2 -10
- package/package.json +4 -4
- package/src/loadConfig.js +2 -9
package/lib/loadConfig.js
CHANGED
|
@@ -20,7 +20,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
20
|
async function load({
|
|
21
21
|
config
|
|
22
22
|
}) {
|
|
23
|
-
let configFile = await config.getConfig(['.lessrc', '.lessrc.js', '.lessrc.cjs'], {
|
|
23
|
+
let configFile = await config.getConfig(['.lessrc', '.lessrc.js', '.lessrc.cjs', '.lessrc.mjs'], {
|
|
24
24
|
packageKey: 'less'
|
|
25
25
|
});
|
|
26
26
|
let configContents = {};
|
|
@@ -35,16 +35,8 @@ async function load({
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
configContents.rewriteUrls = 'all';
|
|
38
|
-
configContents.plugins = configContents.plugins || [];
|
|
39
|
-
|
|
40
|
-
let isDynamic = configFile && _path().default.extname(configFile.filePath) === '.js';
|
|
41
|
-
|
|
42
|
-
if (isDynamic) {
|
|
43
|
-
config.invalidateOnStartup();
|
|
44
|
-
}
|
|
45
|
-
|
|
38
|
+
configContents.plugins = configContents.plugins || [];
|
|
46
39
|
return {
|
|
47
|
-
isStatic: !isDynamic,
|
|
48
40
|
config: configContents
|
|
49
41
|
};
|
|
50
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/transformer-less",
|
|
3
|
-
"version": "2.0.0-nightly.
|
|
3
|
+
"version": "2.0.0-nightly.1289+99f466357",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"source": "src/LessTransformer.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "2.0.0-nightly.
|
|
20
|
+
"parcel": "2.0.0-nightly.1287+99f466357"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/plugin": "2.0.0-nightly.
|
|
23
|
+
"@parcel/plugin": "2.0.0-nightly.1289+99f466357",
|
|
24
24
|
"@parcel/source-map": "^2.1.1",
|
|
25
25
|
"less": "^4.1.1"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "99f46635710785eb1e79e4f3c6bfe8c7b2062993"
|
|
28
28
|
}
|
package/src/loadConfig.js
CHANGED
|
@@ -3,7 +3,6 @@ import type {Config} from '@parcel/types';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
5
|
type ConfigResult = {|
|
|
6
|
-
isStatic: boolean,
|
|
7
6
|
config: any,
|
|
8
7
|
|};
|
|
9
8
|
|
|
@@ -13,7 +12,7 @@ export async function load({
|
|
|
13
12
|
config: Config,
|
|
14
13
|
|}): Promise<ConfigResult> {
|
|
15
14
|
let configFile = await config.getConfig(
|
|
16
|
-
['.lessrc', '.lessrc.js', '.lessrc.cjs'],
|
|
15
|
+
['.lessrc', '.lessrc.js', '.lessrc.cjs', '.lessrc.mjs'],
|
|
17
16
|
{
|
|
18
17
|
packageKey: 'less',
|
|
19
18
|
},
|
|
@@ -35,11 +34,5 @@ export async function load({
|
|
|
35
34
|
configContents.rewriteUrls = 'all';
|
|
36
35
|
configContents.plugins = configContents.plugins || [];
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
let isDynamic = configFile && path.extname(configFile.filePath) === '.js';
|
|
40
|
-
if (isDynamic) {
|
|
41
|
-
config.invalidateOnStartup();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return {isStatic: !isDynamic, config: configContents};
|
|
37
|
+
return {config: configContents};
|
|
45
38
|
}
|