Split the bloated date libs to a separate module that rarely changes, speeding up page loads when the app itself has changed.
This commit is contained in:
1 parent
aec358b6b8
commit
fee7615aac
1 file changed
+14
@@ -15,4 +15,18 @@ export default defineConfig({
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
},
|
||||
},
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
if (id.includes('node_modules/date-fns') ||
|
||||
id.includes('node_modules/date-fns-tz') ||
|
||||
id.includes('node_modules/date-holidays')) {
|
||||
return 'vendor-date-libs';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user