vite-plugin-millennium-skin 1.0.5 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-millennium-skin",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "main": "./dist/index.js",
5
5
  "type": "module",
6
6
  "directories": {
package/src/ts/index.ts CHANGED
@@ -373,7 +373,9 @@ export default function millenniumSkin(): Plugin {
373
373
  }
374
374
  }
375
375
  }
376
- body.splice(i, 1, ...match);
376
+ if (match.length) {
377
+ body.splice(i, 1, ...match);
378
+ }
377
379
  }
378
380
  // 处理动态引入
379
381
  Object.entries(runtimeLinks).forEach(
package/vite.config.ts CHANGED
@@ -22,6 +22,9 @@ const rg: any = {
22
22
  "fs/promises",
23
23
  "@babel/traverse",
24
24
  "@babel/generator",
25
+ "@babel/types",
26
+ "@babel/parser",
27
+ "chalk",
25
28
  ],
26
29
  output: {
27
30
  preserveModules: false,