vite-plugin-electron
Advanced tools
Comparing version 0.28.6 to 0.28.7
@@ -160,3 +160,4 @@ "use strict"; | ||
const optionsArray = Array.isArray(options) ? options : [options]; | ||
let mode; | ||
let userConfig; | ||
let configEnv; | ||
return [ | ||
@@ -169,3 +170,3 @@ { | ||
(_a = server.httpServer) == null ? void 0 : _a.once("listening", () => { | ||
var _a2, _b, _c, _d, _e; | ||
var _a2, _b, _c, _d, _e, _f, _g, _h; | ||
Object.assign(process.env, { | ||
@@ -179,6 +180,9 @@ VITE_DEV_SERVER_URL: resolveServerUrl(server) | ||
(_a2 = options2.vite).mode ?? (_a2.mode = server.config.mode); | ||
(_b = options2.vite).build ?? (_b.build = {}); | ||
(_c = options2.vite.build).watch ?? (_c.watch = {}); | ||
(_d = options2.vite.build).minify ?? (_d.minify = false); | ||
(_e = options2.vite).plugins ?? (_e.plugins = []); | ||
(_b = options2.vite).root ?? (_b.root = server.config.root); | ||
(_c = options2.vite).envDir ?? (_c.envDir = server.config.envDir); | ||
(_d = options2.vite).envPrefix ?? (_d.envPrefix = server.config.envPrefix); | ||
(_e = options2.vite).build ?? (_e.build = {}); | ||
(_f = options2.vite.build).watch ?? (_f.watch = {}); | ||
(_g = options2.vite.build).minify ?? (_g.minify = false); | ||
(_h = options2.vite).plugins ?? (_h.plugins = []); | ||
options2.vite.plugins.push( | ||
@@ -216,10 +220,14 @@ { | ||
config(config, env) { | ||
userConfig = config; | ||
configEnv = env; | ||
config.base ?? (config.base = "./"); | ||
mode = env.mode; | ||
}, | ||
async closeBundle() { | ||
var _a; | ||
var _a, _b, _c, _d; | ||
for (const options2 of optionsArray) { | ||
options2.vite ?? (options2.vite = {}); | ||
(_a = options2.vite).mode ?? (_a.mode = mode); | ||
(_a = options2.vite).mode ?? (_a.mode = configEnv.mode); | ||
(_b = options2.vite).root ?? (_b.root = userConfig.root); | ||
(_c = options2.vite).envDir ?? (_c.envDir = userConfig.envDir); | ||
(_d = options2.vite).envPrefix ?? (_d.envPrefix = userConfig.envPrefix); | ||
await build(options2); | ||
@@ -226,0 +234,0 @@ } |
{ | ||
"name": "vite-plugin-electron", | ||
"version": "0.28.6", | ||
"version": "0.28.7", | ||
"description": "Electron 🔗 Vite", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
53768
930