Skip to content

Commit

Permalink
refactor: disable manualchunks
Browse files Browse the repository at this point in the history
It seems to not be stable. See commented issues for reference

Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
  • Loading branch information
ferferga committed Dec 31, 2023
1 parent 757e357 commit 00c2c75
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export default defineConfig(({ mode }): UserConfig => {
reportCompressedSize: false,
rollupOptions: {
output: {
inlineDynamicImports: true,
validate: true,
plugins: [
mode === 'analyze'
?
Expand All @@ -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';
* }
* }
*/
}
}
},
Expand Down

0 comments on commit 00c2c75

Please sign in to comment.