mirror of
https://github.com/alex8088/electron-vite.git
synced 2025-04-06 04:05:44 +08:00
Merge e5a4ff6c4e4fcff0315a7ae5ae186ff44e1165bc into 1b411d36335bed23505b00c277e4425e66b685d7
This commit is contained in:
commit
f293a8f2d8
@ -131,6 +131,7 @@ cli.command('build [root]', 'build for production').action(async (root: string,
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await build(inlineConfig)
|
await build(inlineConfig)
|
||||||
|
process.exit(0)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const error = e as Error
|
const error = e as Error
|
||||||
createLogger(options.logLevel).error(colors.red(`error during build:\n${error.stack}`), { error })
|
createLogger(options.logLevel).error(colors.red(`error during build:\n${error.stack}`), { error })
|
||||||
|
@ -342,8 +342,7 @@ export function electronRendererVitePlugin(options?: ElectronPluginOptions): Plu
|
|||||||
config(config): void {
|
config(config): void {
|
||||||
const root = options?.root || process.cwd()
|
const root = options?.root || process.cwd()
|
||||||
|
|
||||||
config.base =
|
config.base = config.base ?? './'
|
||||||
config.mode === 'production' || process.env.NODE_ENV_ELECTRON_VITE === 'production' ? './' : config.base
|
|
||||||
config.root = config.root || './src/renderer'
|
config.root = config.root || './src/renderer'
|
||||||
|
|
||||||
const chromeTarget = getElectronChromeTarget()
|
const chromeTarget = getElectronChromeTarget()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user