1
This commit is contained in:
25
vite.config.ts
Normal file
25
vite.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import {defineConfig} from 'vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import {resolve} from "path";
|
||||
|
||||
const pathResolve = (dir: string): any => {
|
||||
return resolve(__dirname, ".", dir)
|
||||
}
|
||||
const alias: Record<string, string> = {
|
||||
'@': pathResolve("src")
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
],
|
||||
server: {
|
||||
host: true,
|
||||
},
|
||||
resolve: {
|
||||
alias
|
||||
},
|
||||
build: {
|
||||
outDir: './xiaoling_dist',
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user