chore: 更新依赖,优化wsl下开发体验
This commit is contained in:
+5
-2
@@ -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: '',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user