From b8112568306b0612036c8b754bdf23e8a7606e9b Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Thu, 27 Oct 2022 15:51:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 57ab6d9..b1c7707 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -69,7 +69,18 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => { build: { sourcemap: false, // 消除打包大小超过500kb警告 - chunkSizeWarningLimit: 4000 + chunkSizeWarningLimit: 4000, + rollupOptions: { + input: { + index: pathResolve("index.html") + }, + // 静态资源分类打包 + output: { + chunkFileNames: "static/js/[name]-[hash].js", + entryFileNames: "static/js/[name]-[hash].js", + assetFileNames: "static/[ext]/[name]-[hash].[ext]" + } + } }, define: { __INTLIFY_PROD_DEVTOOLS__: false,