Add package.json.optimization
This commit is contained in:
14
package.json.optimization
Normal file
14
package.json.optimization
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user