@tomjs/vite-plugin-electron 1.3.2 → 1.3.3

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/README.md CHANGED
@@ -282,9 +282,13 @@ Run `Debug Main Process` through `vscode` to debug the main thread. For debuggin
282
282
  "windows": {
283
283
  "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
284
284
  },
285
- "program": "${workspaceRoot}/dist/main/index.js",
285
+ "args": ["."],
286
286
  "envFile": "${workspaceRoot}/node_modules/@tomjs/vite-plugin-electron/debug/.env"
287
287
  }
288
288
  ]
289
289
  }
290
290
  ```
291
+
292
+ **Notice**
293
+
294
+ Although `Electron v28` supports `esm`, `VSCode Debug` breakpoints may not work properly. In this case, you can consider using `cjs` mode.
package/README.zh_CN.md CHANGED
@@ -281,9 +281,13 @@ app.whenReady().then(() => {
281
281
  "windows": {
282
282
  "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
283
283
  },
284
- "program": "${workspaceRoot}/dist/main/index.js",
284
+ "args": ["."],
285
285
  "envFile": "${workspaceRoot}/node_modules/@tomjs/vite-plugin-electron/debug/.env"
286
286
  }
287
287
  ]
288
288
  }
289
289
  ```
290
+
291
+ **说明**
292
+
293
+ `Electron v28` 虽然支持了 `esm`,但是 `VSCode Debug` 断点可能无法正常工作,这时可以考虑使用 `cjs` 模式。
package/dist/index.js CHANGED
@@ -65,6 +65,7 @@ function getBuildOptions(options) {
65
65
  }).map((cfg) => {
66
66
  return {
67
67
  ...cfg,
68
+ splitting: false,
68
69
  silent: true
69
70
  };
70
71
  });
package/dist/index.mjs CHANGED
@@ -65,6 +65,7 @@ function getBuildOptions(options) {
65
65
  }).map((cfg) => {
66
66
  return {
67
67
  ...cfg,
68
+ splitting: false,
68
69
  silent: true
69
70
  };
70
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-electron",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "A simple vite plugin for electron, supports esm/cjs.",
5
5
  "keywords": [
6
6
  "vite",
@@ -45,7 +45,6 @@
45
45
  "kolorist": "^1.8.0",
46
46
  "lodash.clonedeep": "^4.5.0",
47
47
  "lodash.merge": "^4.6.2",
48
- "shelljs": "^0.8.5",
49
48
  "tree-kill": "^1.2.2",
50
49
  "tsup": "7.2.0"
51
50
  },
@@ -73,7 +72,8 @@
73
72
  "vite": "^5.0.7"
74
73
  },
75
74
  "peerDependencies": {
76
- "electron": ">=12.0.0"
75
+ "electron": ">=12.0.0",
76
+ "vite": ">=2"
77
77
  },
78
78
  "scripts": {
79
79
  "dev": "tsup --watch",