mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 20:07:06 +08:00
26 lines
556 B
JavaScript
26 lines
556 B
JavaScript
process.env.NODE_ENV = 'production'
|
|
|
|
import { dirname, join } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import { build } from 'vite'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
await build({
|
|
configFile: 'scripts/vite.config.mjs',
|
|
root: join(__dirname, '../src/main'),
|
|
build: {
|
|
outDir: '../../dist/main',
|
|
},
|
|
})
|
|
|
|
await build({
|
|
configFile: 'scripts/vite.config.mjs',
|
|
root: join(__dirname, '../src/preload'),
|
|
build: {
|
|
outDir: '../../dist/preload',
|
|
},
|
|
})
|
|
|
|
await build({ configFile: 'src/renderer/vite.config.ts' })
|