fix: emptyOutDir = true

This commit is contained in:
草鞋没号 2022-04-15 07:52:22 +08:00
parent c4cd89205a
commit ca56f32a3d
3 changed files with 6 additions and 3 deletions

View File

@ -6,13 +6,14 @@ export default defineConfig({
root: __dirname,
build: {
outDir: '../../dist/main',
emptyOutDir: true,
minify: process.env./* from mode option */NODE_ENV === 'production',
sourcemap: true,
lib: {
entry: 'index.ts',
formats: ['cjs'],
fileName: () => '[name].cjs',
},
minify: process.env./* from mode option */NODE_ENV === 'production',
sourcemap: true,
rollupOptions: {
external: [
'electron',

View File

@ -7,6 +7,7 @@ export default defineConfig({
root: __dirname,
build: {
outDir: '../../dist/preload',
emptyOutDir: true,
minify: process.env./* from mode option */NODE_ENV === 'production',
// https://github.com/caoxiemeihao/electron-vue-vite/issues/61
sourcemap: 'inline',

View File

@ -25,8 +25,9 @@ export default defineConfig({
],
base: './',
build: {
sourcemap: true,
outDir: '../../dist/renderer',
emptyOutDir: true,
sourcemap: true,
},
server: {
host: pkg.env.VITE_DEV_SERVER_HOST,