mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-02-26 04:40:10 +08:00
feat: config server option by package.json
This commit is contained in:
parent
8c846a34c0
commit
f65ed8f486
@ -3,6 +3,7 @@ import { join } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import electron from 'vite-plugin-electron'
|
||||
import pkg from './package.json'
|
||||
|
||||
rmSync('dist', { recursive: true, force: true }) // v14.14.0
|
||||
|
||||
@ -37,4 +38,8 @@ export default defineConfig({
|
||||
renderer: {},
|
||||
}),
|
||||
],
|
||||
server: {
|
||||
host: pkg.env.VITE_DEV_SERVER_HOST,
|
||||
port: pkg.env.VITE_DEV_SERVER_PORT,
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user