fix: in the specified non-production mode, the base path is wrong
This commit is contained in:
parent
556fe95f20
commit
19bfb2a829
|
@ -216,7 +216,8 @@ 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.mode === 'production' ? './' : 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 electornVer = getElectronMainVer(root)
|
const electornVer = getElectronMainVer(root)
|
||||||
|
|
Loading…
Reference in a new issue