mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 20:07:06 +08:00
chore: UPDATE comment
This commit is contained in:
parent
76660bbd6c
commit
2760856314
@ -16,7 +16,7 @@ const pkg = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf8')
|
|||||||
*/
|
*/
|
||||||
function getWatcher({ name, configFile, writeBundle }) {
|
function getWatcher({ name, configFile, writeBundle }) {
|
||||||
return viteBuild({
|
return viteBuild({
|
||||||
// Fix form 'vite-main.config.ts' and 'vite-preload.config.ts'
|
// Ensure `vite-main.config.ts` and `vite-preload.config.ts` correct `process.env.NODE_ENV`
|
||||||
mode: process.env.NODE_ENV,
|
mode: process.env.NODE_ENV,
|
||||||
// Options here precedence over configFile
|
// Options here precedence over configFile
|
||||||
build: {
|
build: {
|
||||||
@ -48,7 +48,7 @@ async function watchMain() {
|
|||||||
electronProcess && electronProcess.kill()
|
electronProcess && electronProcess.kill()
|
||||||
electronProcess = spawn(electron, ['.'], {
|
electronProcess = spawn(electron, ['.'], {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
env: Object.assign(process.env, pkg.env), // Why don't work?
|
env: Object.assign(process.env, pkg.env),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user