@parcel/optimizer-terser 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.
@@ -86,16 +86,7 @@ var _default = new (_plugin().Optimizer)({
86
86
  config,
87
87
  options
88
88
  }) {
89
- let userConfig = await config.getConfigFrom(_path().default.join(options.projectRoot, 'index'), ['.terserrc', '.terserrc.js', '.terserrc.cjs']);
90
-
91
- if (userConfig) {
92
- let isJavascript = _path().default.extname(userConfig.filePath) === '.js';
93
-
94
- if (isJavascript) {
95
- config.invalidateOnStartup();
96
- }
97
- }
98
-
89
+ let userConfig = await config.getConfigFrom(_path().default.join(options.projectRoot, 'index'), ['.terserrc', '.terserrc.js', '.terserrc.cjs', '.terserrc.mjs']);
99
90
  return userConfig === null || userConfig === void 0 ? void 0 : userConfig.contents;
100
91
  },
101
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/optimizer-terser",
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,15 +17,15 @@
17
17
  "source": "src/TerserOptimizer.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/diagnostic": "2.8.2",
24
- "@parcel/plugin": "2.8.2",
23
+ "@parcel/diagnostic": "2.8.4-nightly.0+7b79c6d",
24
+ "@parcel/plugin": "2.8.4-nightly.0+7b79c6d",
25
25
  "@parcel/source-map": "^2.1.1",
26
- "@parcel/utils": "2.8.2",
26
+ "@parcel/utils": "2.8.4-nightly.0+7b79c6d",
27
27
  "nullthrows": "^1.1.1",
28
28
  "terser": "^5.2.0"
29
29
  },
30
- "gitHead": "3437f64e4c6f57d911614c480b742e229149f200"
30
+ "gitHead": "7b79c6d69ffabef89810a8db61e9abdeb70d6990"
31
31
  }
@@ -13,16 +13,9 @@ export default (new Optimizer({
13
13
  async loadConfig({config, options}) {
14
14
  let userConfig = await config.getConfigFrom(
15
15
  path.join(options.projectRoot, 'index'),
16
- ['.terserrc', '.terserrc.js', '.terserrc.cjs'],
16
+ ['.terserrc', '.terserrc.js', '.terserrc.cjs', '.terserrc.mjs'],
17
17
  );
18
18
 
19
- if (userConfig) {
20
- let isJavascript = path.extname(userConfig.filePath) === '.js';
21
- if (isJavascript) {
22
- config.invalidateOnStartup();
23
- }
24
- }
25
-
26
19
  return userConfig?.contents;
27
20
  },
28
21
  async optimize({