diff --git a/nkebao/vite.config.ts b/nkebao/vite.config.ts index 52f1437a..61202518 100644 --- a/nkebao/vite.config.ts +++ b/nkebao/vite.config.ts @@ -1,15 +1,27 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; -import path from 'path'; +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import path from "path"; export default defineConfig({ plugins: [react()], resolve: { alias: { - '@': path.resolve('src'), + "@": path.resolve("src"), }, }, server: { open: true, }, -}); \ No newline at end of file + 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"], + }, + }, + }, + }, +});