chore: 更新依赖,优化wsl下开发体验

This commit is contained in:
lblblong
2021-11-18 14:52:07 +08:00
parent 112fa6e55e
commit e449e92f5a
7 changed files with 43 additions and 44 deletions
+5 -2
View File
@@ -1,12 +1,15 @@
import react from '@vitejs/plugin-react'
import path from 'path'
import { defineConfig } from 'vite'
import isWsl from 'is-wsl'
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: false,
outDir: 'build'
emptyOutDir: true,
// wsl 下输出到 c 盘目录
outDir: isWsl ? '/mnt/c/code/utools/nat-utools' : 'dist',
},
base: './',
plugins: [react()],
@@ -21,5 +24,5 @@ export default defineConfig({
replacement: '',
},
],
}
},
})