mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
fix main process env bug
This commit is contained in:
parent
72f4b11854
commit
0d0037e889
@ -19,6 +19,7 @@ const argv = minimist(process.argv.slice(2))
|
||||
const opts = options(argv.env)
|
||||
const TAG = '[build-main.ts]'
|
||||
const spinner = ora(`${TAG} Electron build...`)
|
||||
process.env.NODE_ENV = argv.env
|
||||
|
||||
if (argv.watch) {
|
||||
waitOn({ port: process.env.PORT as string }).then(msg => {
|
||||
|
2
typings/global.d.ts
vendored
2
typings/global.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
readonly NODE_ENV: 'development' | 'production'
|
||||
NODE_ENV: 'development' | 'production'
|
||||
readonly PORT: string
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user