mirror of
https://github.com/alex8088/electron-vite.git
synced 2026-07-13 10:21:08 +08:00
Compare commits
4 Commits
f293a8f2d8
...
7b9c14319d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b9c14319d | ||
|
|
3d5c9f68a1 | ||
|
|
e5a4ff6c4e | ||
|
|
f33f67c147 |
@ -131,6 +131,7 @@ cli.command('build [root]', 'build for production').action(async (root: string,
|
||||
|
||||
try {
|
||||
await build(inlineConfig)
|
||||
process.exit(0)
|
||||
} catch (e) {
|
||||
const error = e as Error
|
||||
createLogger(options.logLevel).error(colors.red(`error during build:\n${error.stack}`), { error })
|
||||
|
||||
@ -69,6 +69,7 @@ export function getElectronNodeTarget(): string {
|
||||
const electronVer = getElectronMajorVer()
|
||||
|
||||
const nodeVer = {
|
||||
'36': '22.14',
|
||||
'35': '22.14',
|
||||
'34': '20.18',
|
||||
'33': '20.18',
|
||||
@ -103,6 +104,7 @@ export function getElectronChromeTarget(): string {
|
||||
const electronVer = getElectronMajorVer()
|
||||
|
||||
const chromeVer = {
|
||||
'36': '136',
|
||||
'35': '134',
|
||||
'34': '132',
|
||||
'33': '130',
|
||||
|
||||
@ -342,8 +342,7 @@ export function electronRendererVitePlugin(options?: ElectronPluginOptions): Plu
|
||||
config(config): void {
|
||||
const root = options?.root || process.cwd()
|
||||
|
||||
config.base =
|
||||
config.mode === 'production' || process.env.NODE_ENV_ELECTRON_VITE === 'production' ? './' : config.base
|
||||
config.base = config.base ?? './'
|
||||
config.root = config.root || './src/renderer'
|
||||
|
||||
const chromeTarget = getElectronChromeTarget()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user