From a3e9e13b29d72a48d45da207030b878be791ee9d Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 25 Sep 2025 09:34:03 -0600 Subject: [PATCH] Split the bloated date libs to a separate module that rarely changes, speeding up page loads when the app itself has changed. --- vite.config.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vite.config.js b/vite.config.js index 4217010..ef95211 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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'; + } + } + } + } + } })