@tomjs/vite-plugin-electron 1.9.2 → 1.9.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/dist/index.js CHANGED
@@ -116,7 +116,6 @@ function getMirror() {
116
116
  }
117
117
  function getBuilderConfig(options, resolvedConfig) {
118
118
  var _a;
119
- createPkg(options, resolvedConfig);
120
119
  const config = {
121
120
  directories: {
122
121
  buildResources: "electron/build",
@@ -232,8 +231,9 @@ async function runElectronBuilder(options, resolvedConfig) {
232
231
  }
233
232
  logger.info("building electron app...");
234
233
  const DIST_PATH = _path2.default.join(_process.cwd.call(void 0, ), _path2.default.dirname(resolvedConfig.build.outDir));
234
+ createPkg(options, resolvedConfig);
235
235
  logger.info(`create package.json and exec "npm install"`);
236
- _shelljs2.default.exec(`cd ${DIST_PATH} && npm i`);
236
+ _shelljs2.default.exec(`cd ${DIST_PATH} && npm install --emit=dev`);
237
237
  logger.info(`run electron-builder to package app`);
238
238
  const config = getBuilderConfig(options, resolvedConfig);
239
239
  const { build } = await Promise.resolve().then(() => _interopRequireWildcard(require("electron-builder")));
package/dist/index.mjs CHANGED
@@ -115,7 +115,6 @@ function getMirror() {
115
115
  }
116
116
  function getBuilderConfig(options, resolvedConfig) {
117
117
  var _a;
118
- createPkg(options, resolvedConfig);
119
118
  const config = {
120
119
  directories: {
121
120
  buildResources: "electron/build",
@@ -231,8 +230,9 @@ async function runElectronBuilder(options, resolvedConfig) {
231
230
  }
232
231
  logger.info("building electron app...");
233
232
  const DIST_PATH = path.join(cwd(), path.dirname(resolvedConfig.build.outDir));
233
+ createPkg(options, resolvedConfig);
234
234
  logger.info(`create package.json and exec "npm install"`);
235
- shell.exec(`cd ${DIST_PATH} && npm i`);
235
+ shell.exec(`cd ${DIST_PATH} && npm install --emit=dev`);
236
236
  logger.info(`run electron-builder to package app`);
237
237
  const config = getBuilderConfig(options, resolvedConfig);
238
238
  const { build } = await import("electron-builder");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-electron",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "A simple vite plugin for electron, supports esm/cjs, support esm in electron v28+",
5
5
  "keywords": [
6
6
  "vite",
@@ -72,6 +72,7 @@
72
72
  "prettier": "^3.3.3",
73
73
  "rimraf": "^6.0.1",
74
74
  "stylelint": "^16.8.1",
75
+ "vite": "^5.3.5",
75
76
  "tsx": "^4.16.5",
76
77
  "typescript": "~5.5.4"
77
78
  },