From 00c2c754a12f74cae2031009f300abc7093ac72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Sun, 31 Dec 2023 18:10:11 +0100 Subject: [PATCH] refactor: disable manualchunks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems to not be stable. See commented issues for reference Signed-off-by: Fernando Fernández --- frontend/vite.config.ts | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 44b10882434..702b0d50113 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -70,6 +70,8 @@ export default defineConfig(({ mode }): UserConfig => { reportCompressedSize: false, rollupOptions: { output: { + inlineDynamicImports: true, + validate: true, plugins: [ mode === 'analyze' ? @@ -80,15 +82,23 @@ export default defineConfig(({ mode }): UserConfig => { brotliSize: true }) : undefined - ], - manualChunks(id) { - if ( - id.includes('virtual:locales') || - id.includes('@intlify/unplugin-vue-i18n/messages') - ) { - return 'localization'; - } - } + ] + /** + * TODO: Revisit after the following issues are fixed: + * - https://github.com/vitejs/vite/issues/5142 + * - https://github.com/evanw/esbuild/issues/399 + * - https://github.com/rollup/rollup/issues/3888 + */ + /* + * manualChunks(id) { + * if ( + * id.includes('virtual:locales') || + * id.includes('@intlify/unplugin-vue-i18n/messages') + * ) { + * return 'localization'; + * } + * } + */ } } },