28 lines
627 B
TypeScript
28 lines
627 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve("src"),
|
|
},
|
|
},
|
|
server: {
|
|
open: true,
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1500, // 提高警告阈值,减少无关警告
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"react-vendor": ["react", "react-dom"],
|
|
"antd-vendor": ["antd", "@ant-design/icons", "antd-mobile"],
|
|
"echarts-vendor": ["echarts", "echarts-for-react"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|