pack: change vite.config.ts config

This commit is contained in:
leejooy96 committed 2023-03-12 15:09:51 +09:00
1 parent 56b158ff67
commit 1df8fdb26a
2 files changed
+160 -5850

No files matched your search

+144 -5839
View File
File diff suppressed because it is too large. Load diff
+16 -11
View File
@@ -10,9 +10,10 @@ import { rmSync } from 'fs'
import { resolve, dirname } from 'path'
import { builtinModules } from 'module'
rmSync('dist', { recursive: true, force: true })
export default defineConfig(() => {
rmSync('dist', { recursive: true, force: true })
export default defineConfig({
return {
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: false,
@@ -43,18 +44,10 @@ export default defineConfig({
eslintPlugin(),
// Docs: https://github.com/electron-vite/vite-plugin-electron
electronPlugin([
{
entry: ['src/preload/index.ts'],
vite: {
build: {
outDir: 'dist/preload'
}
}
},
{
entry: ['src/main/index.ts'],
onstart: (options) => {
options.startup(['.', '--no-sandbox'])
options.startup()
},
vite: {
build: {
@@ -65,8 +58,20 @@ export default defineConfig({
}
}
}
},
{
entry: ['src/preload/index.ts'],
onstart: (options) => {
options.reload()
},
vite: {
build: {
outDir: 'dist/preload'
}
}
}
]),
rendererPlugin()
]
}
})