feat: remove dist before run build

This commit is contained in:
younglei 2022-06-15 21:47:33 +08:00
parent fcce0884fa
commit ee96bdd2c5

View File

@ -1,9 +1,12 @@
import { rmSync } from 'fs'
import { join } from 'path' import { join } from 'path'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import electron from 'vite-plugin-electron' import electron from 'vite-plugin-electron'
import renderer from 'vite-plugin-electron/renderer' import renderer from 'vite-plugin-electron/renderer'
rmSync('dist', { recursive: true, force: true }) // v14.14.0
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [