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:
2025-09-25 21:34:03 +00:00
parent aec358b6b8
commit fee7615aac
+14
View File
@@ -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';
}
}
}
}
}
})