fix: configure build options

This commit is contained in:
younglei 2022-06-14 21:17:45 +08:00
parent e2798e025d
commit f41ddead18

View File

@ -12,12 +12,23 @@ export default defineConfig({
electron({
main: {
entry: 'electron-main/index.ts',
vite: {
build: {
sourcemap: false,
},
},
},
preload: {
input: {
// You can configure multiple preload here
p1: join(__dirname, 'electron-preload'),
splash: join(__dirname, 'electron-preload/splash.ts'),
},
vite: {
build: {
// For debug
sourcemap: 'inline',
}
}
},
}),
// Enable use Electron, Node.js API in Renderer-process
@ -25,4 +36,8 @@ export default defineConfig({
// TODO: integrate into 'vite-plugin-electron' by default
polyfillExports(),
],
build: {
// TODO: integrate into 'vite-plugin-electron' by default
emptyOutDir: false,
},
})