From 687363cc1d96c88cc3e8745f16370455562e7d07 Mon Sep 17 00:00:00 2001 From: ZvonimirSun Date: Mon, 30 Oct 2023 17:19:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=AF=8F=E6=AC=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=80=E6=9C=89=E6=96=87=E4=BB=B6=E7=9A=86?= =?UTF-8?q?=E8=A2=AB=E4=BF=AE=E6=94=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto-imports.d.ts | 1 - vite.config.ts | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index 40d4fad4d..aca8e5b11 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -8,7 +8,6 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] - const ElTag: typeof import('element-plus/es')['ElTag'] const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] diff --git a/vite.config.ts b/vite.config.ts index 94b3b5d10..ddaffdaad 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -147,6 +147,21 @@ export default defineConfig({ optimizeDeps: { include: ['vue', 'element-plus', 'ant-design-vue'] }, + build: { + rollupOptions: { + output: { + entryFileNames: 'assets/[name].js', + // Workaround: Vite is bundling its plugins to the main index chunk, + // causing circular dependencies and cascading hash changes. + manualChunks (id) { + if (id.startsWith('vite/') || id.startsWith('\0vite/')) { + // Put the Vite modules and virtual modules (beginning with \0) into a vite chunk. + return 'vite' + } + } + } + } + }, resolve: { alias: { '@': resolve('src')