fix: electorn's export subpaths also need to be externalized #372
This commit is contained in:
parent
921aa9d4a7
commit
a12646f25e
|
@ -76,7 +76,7 @@ export function electronMainVitePlugin(options?: ElectronPluginOptions): Plugin[
|
|||
target: nodeTarget,
|
||||
assetsDir: 'chunks',
|
||||
rollupOptions: {
|
||||
external: ['electron', ...builtinModules.flatMap(m => [m, `node:${m}`])],
|
||||
external: ['electron', /^electron\/.+/, ...builtinModules.flatMap(m => [m, `node:${m}`])],
|
||||
output: {}
|
||||
},
|
||||
reportCompressedSize: false,
|
||||
|
@ -203,7 +203,7 @@ export function electronPreloadVitePlugin(options?: ElectronPluginOptions): Plug
|
|||
target: nodeTarget,
|
||||
assetsDir: 'chunks',
|
||||
rollupOptions: {
|
||||
external: ['electron', ...builtinModules.flatMap(m => [m, `node:${m}`])],
|
||||
external: ['electron', /^electron\/.+/, ...builtinModules.flatMap(m => [m, `node:${m}`])],
|
||||
output: {}
|
||||
},
|
||||
reportCompressedSize: false,
|
||||
|
|
Loading…
Reference in a new issue