@modern-js/rsbuild-plugin-esbuild 0.0.0-nightly-20240613170702 → 0.0.0-nightly-20240614170707

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -78,12 +78,16 @@ function pluginEsbuild(userOptions = {}) {
78
78
  chain.optimization.minimizers.delete(CHAIN_ID.MINIMIZER.JS).delete(CHAIN_ID.MINIMIZER.CSS);
79
79
  chain.optimization.minimizer(CHAIN_ID.MINIMIZER.ESBUILD).use(ESBuildMinifyPlugin).init(() => {
80
80
  var _rsbuildConfig_output;
81
- return new ESBuildMinifyPlugin({
82
- // other legalComments such as linked is not supported yet
83
- // https://github.com/privatenumber/esbuild-loader/issues/263
84
- legalComments: ((_rsbuildConfig_output = rsbuildConfig.output) === null || _rsbuildConfig_output === void 0 ? void 0 : _rsbuildConfig_output.legalComments) === "none" ? "none" : "inline",
85
- ...options === null || options === void 0 ? void 0 : options.minimize
86
- });
81
+ return (
82
+ // @ts-expect-error
83
+ // Due to rspack compiler missing some properties, but ESBuildMinifyPlugin only works in webpack.
84
+ new ESBuildMinifyPlugin({
85
+ // other legalComments such as linked is not supported yet
86
+ // https://github.com/privatenumber/esbuild-loader/issues/263
87
+ legalComments: ((_rsbuildConfig_output = rsbuildConfig.output) === null || _rsbuildConfig_output === void 0 ? void 0 : _rsbuildConfig_output.legalComments) === "none" ? "none" : "inline",
88
+ ...options === null || options === void 0 ? void 0 : options.minimize
89
+ })
90
+ );
87
91
  });
88
92
  }
89
93
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/rsbuild-plugin-esbuild",
3
- "version": "0.0.0-nightly-20240613170702",
3
+ "version": "0.0.0-nightly-20240614170707",
4
4
  "description": "Esbuild Rsbuild plugin and Modern.js",
5
5
  "homepage": "https://modernjs.dev",
6
6
  "repository": {
@@ -23,15 +23,15 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@swc/helpers": "0.5.3",
26
- "@rsbuild/shared": "0.7.3",
26
+ "@rsbuild/shared": "0.7.7",
27
27
  "esbuild": "0.17.19",
28
- "webpack": "^5.91.0"
28
+ "webpack": "^5.92.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@rsbuild/core": "0.7.3",
32
- "@rsbuild/webpack": "0.7.3",
31
+ "@rsbuild/core": "0.7.7",
32
+ "@rsbuild/webpack": "0.7.7",
33
33
  "typescript": "^5.4.2",
34
- "@scripts/build": "0.0.0-nightly-20240613170702"
34
+ "@scripts/build": "0.0.0-nightly-20240614170707"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public",