@parcel/transformer-pug 2.8.2 → 2.8.4-nightly.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.
@@ -41,17 +41,8 @@ var _default = new (_plugin().Transformer)({
41
41
  async loadConfig({
42
42
  config
43
43
  }) {
44
- let configFile = await config.getConfig(['.pugrc', '.pugrc.js', '.pugrc.cjs', 'pug.config.js', 'pug.config.cjs']);
45
-
46
- if (configFile) {
47
- let isJavascript = _path().default.extname(configFile.filePath).endsWith('js');
48
-
49
- if (isJavascript) {
50
- config.invalidateOnStartup();
51
- }
52
-
53
- return configFile.contents;
54
- }
44
+ let configFile = await config.getConfig(['.pugrc', '.pugrc.js', '.pugrc.cjs', '.pugrc.mjs', 'pug.config.js', 'pug.config.cjs', 'pug.config.mjs']);
45
+ return configFile === null || configFile === void 0 ? void 0 : configFile.contents;
55
46
  },
56
47
 
57
48
  async transform({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/transformer-pug",
3
- "version": "2.8.2",
3
+ "version": "2.8.4-nightly.0+7b79c6d",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,11 +17,11 @@
17
17
  "source": "src/PugTransformer.js",
18
18
  "engines": {
19
19
  "node": ">= 12.0.0",
20
- "parcel": "^2.8.2"
20
+ "parcel": "2.8.4-nightly.0+7b79c6d"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/plugin": "2.8.2",
23
+ "@parcel/plugin": "2.8.4-nightly.0+7b79c6d",
24
24
  "pug": "^3.0.2"
25
25
  },
26
- "gitHead": "3437f64e4c6f57d911614c480b742e229149f200"
26
+ "gitHead": "7b79c6d69ffabef89810a8db61e9abdeb70d6990"
27
27
  }
@@ -10,18 +10,13 @@ export default (new Transformer({
10
10
  '.pugrc',
11
11
  '.pugrc.js',
12
12
  '.pugrc.cjs',
13
+ '.pugrc.mjs',
13
14
  'pug.config.js',
14
15
  'pug.config.cjs',
16
+ 'pug.config.mjs',
15
17
  ]);
16
18
 
17
- if (configFile) {
18
- let isJavascript = path.extname(configFile.filePath).endsWith('js');
19
- if (isJavascript) {
20
- config.invalidateOnStartup();
21
- }
22
-
23
- return configFile.contents;
24
- }
19
+ return configFile?.contents;
25
20
  },
26
21
 
27
22
  async transform({asset, config}) {