From cbc8c4a501f1c4b9a0a54fa0ee8ba4c91cf30aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=94=E8=AE=B0=E6=9C=AC=E9=87=8C=E7=9A=84=E6=B0=B8?= =?UTF-8?q?=E5=B9=B3?= Date: Fri, 25 Jul 2025 18:08:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E6=AC=A1=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E5=A6=82=E4=B8=8B=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E5=8C=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nkebao/vite.config.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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"], + }, + }, + }, + }, +});