mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-02-26 13:00:09 +08:00
fix: configure build options
This commit is contained in:
parent
e2798e025d
commit
f41ddead18
@ -12,12 +12,23 @@ export default defineConfig({
|
|||||||
electron({
|
electron({
|
||||||
main: {
|
main: {
|
||||||
entry: 'electron-main/index.ts',
|
entry: 'electron-main/index.ts',
|
||||||
|
vite: {
|
||||||
|
build: {
|
||||||
|
sourcemap: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
preload: {
|
preload: {
|
||||||
input: {
|
input: {
|
||||||
// You can configure multiple preload here
|
// 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
|
// Enable use Electron, Node.js API in Renderer-process
|
||||||
@ -25,4 +36,8 @@ export default defineConfig({
|
|||||||
// TODO: integrate into 'vite-plugin-electron' by default
|
// TODO: integrate into 'vite-plugin-electron' by default
|
||||||
polyfillExports(),
|
polyfillExports(),
|
||||||
],
|
],
|
||||||
|
build: {
|
||||||
|
// TODO: integrate into 'vite-plugin-electron' by default
|
||||||
|
emptyOutDir: false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user