chore: add electron-vite mode node env
This commit is contained in:
parent
cd0bbb6cfb
commit
4779bcf911
|
@ -5,6 +5,7 @@ import { InlineConfig, resolveConfig } from './config'
|
|||
* Bundles the electron app for production.
|
||||
*/
|
||||
export async function build(inlineConfig: InlineConfig = {}): Promise<void> {
|
||||
process.env.NODE_ENV_ELECTRON_VITE = 'production'
|
||||
const config = await resolveConfig(inlineConfig, 'build', 'production')
|
||||
if (config.config) {
|
||||
const mainViteConfig = config.config?.main
|
||||
|
|
|
@ -13,6 +13,7 @@ import { resolveHostname } from './utils'
|
|||
import { startElectron } from './electron'
|
||||
|
||||
export async function createServer(inlineConfig: InlineConfig = {}): Promise<void> {
|
||||
process.env.NODE_ENV_ELECTRON_VITE = 'development'
|
||||
const config = await resolveConfig(inlineConfig, 'serve', 'development')
|
||||
if (config.config) {
|
||||
const logger = createLogger(inlineConfig.logLevel)
|
||||
|
|
Loading…
Reference in a new issue