chore: upate

This commit is contained in:
草鞋没号
2020-08-31 09:50:57 +08:00
parent 278a3468d2
commit 79cd832cfc
11 changed files with 45 additions and 12 deletions

View File

@@ -6,11 +6,20 @@ import { UserConfig } from 'vite'
import dotenv from 'dotenv'
dotenv.config({ path: join(__dirname, '.env') })
const root = join(__dirname, 'src/render')
const config: UserConfig = {
root: join(__dirname, 'src/render'),
root,
port: +process.env.PORT,
base: './',
outDir: join(__dirname, 'dist/render'),
alias: {
// 别名必须以 / 开头、结尾
'/@/': root,
},
optimizeDeps: {
allowNodeBuiltins: ['electron-is-dev', 'electron-store', 'electron']
},
}
export default config