ms-vite-plugin 0.1.5 → 0.1.7

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/build.js +7 -4
  2. package/package.json +2 -1
package/dist/build.js CHANGED
@@ -108,10 +108,13 @@ const buildAll = async (isDev = true, workspacePath) => {
108
108
  outDir: isDev ? "dist/scripts" : "msbundle/scripts",
109
109
  emptyOutDir: false, // 不要每次清空输出目录
110
110
  sourcemap: isDev,
111
- minify: !isDev, // 开发环境不压缩变量名
112
- },
113
- esbuild: {
114
- keepNames: true,
111
+ minify: isDev ? false : "terser", // 开发环境不压缩变量名
112
+ terserOptions: {
113
+ // @ts-ignore
114
+ mangle: {
115
+ reserved: ["main"],
116
+ },
117
+ },
115
118
  },
116
119
  plugins: isDev
117
120
  ? [returnMain()]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-vite-plugin",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,6 +21,7 @@
21
21
  "dependencies": {
22
22
  "commander": "^14.0.2",
23
23
  "fs-extra": "^11.3.2",
24
+ "terser": "^5.44.1",
24
25
  "vite": "^7.2.2",
25
26
  "vite-plugin-bundle-obfuscator": "^1.8.0",
26
27
  "zip-a-folder": "^3.1.9"