From 03ecd66c84985d7a083dcd722b209ed830151aac Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 10 Mar 2026 16:42:12 +0000 Subject: [PATCH] Add package.json.optimization --- package.json.optimization | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package.json.optimization diff --git a/package.json.optimization b/package.json.optimization new file mode 100644 index 0000000..d286d46 --- /dev/null +++ b/package.json.optimization @@ -0,0 +1,14 @@ +// Bundle optimization guidelines: +// 1. Tree-shaking enabled by default in Next.js with swcMinify: true +// 2. Dynamic imports for non-critical components +// 3. Code splitting configured in next.config.js for lucide-react, react, and common chunks +// 4. Service Worker caches on install and updates cache on fetch +// 5. Middleware applies proper cache headers: +// - Static assets: 1 year (immutable) +// - HTML pages: 1 hour + 1 day server cache +// - Dynamic content: 1 minute + 5 minutes server cache +// 6. Font optimization with display: 'swap' to avoid layout shift +// 7. DNS prefetch for external image CDN +// 8. Production source maps disabled +// 9. Image optimization with WebP and AVIF formats +// 10. Experimental optimizePackageImports for better tree-shaking