perf: alway disable build.modulePreload in main and preload config
This commit is contained in:
parent
103beec87b
commit
1cb7d419a2
|
@ -91,6 +91,8 @@ export function electronMainVitePlugin(options?: ElectronPluginOptions): Plugin[
|
|||
config.publicDir = config.publicDir || 'resources'
|
||||
// do not copy public dir
|
||||
config.build.copyPublicDir = false
|
||||
// module preload polyfill does not apply to nodejs (main process)
|
||||
config.build.modulePreload = false
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -191,6 +193,8 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
|||
config.publicDir = config.publicDir || 'resources'
|
||||
// do not copy public dir
|
||||
config.build.copyPublicDir = false
|
||||
// module preload polyfill does not apply to nodejs (preload scripts)
|
||||
config.build.modulePreload = false
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue