25 lines
472 B
TypeScript
25 lines
472 B
TypeScript
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',
|
|
}
|
|
}); |