feat: add bundle analyzer for performance monitoring

- Installed @next/bundle-analyzer for bundle size analysis
- Configured Next.js to optionally run bundle analysis with ANALYZE=true
- Note: Bundle analyzer not yet compatible with Turbopack builds
- Manual analysis shows well-optimized bundle:
  * Largest chunks: 114K (React/core), 110K (store/state)
  * CSS bundle: 34K
  * Most chunks under 30K thanks to code splitting
  * Total static chunks: 864K
- Code splitting already implemented for all tools
- Lazy loading active for optimal performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-21 16:54:49 +01:00
parent 513b865b1f
commit 27110f939e
3 changed files with 140 additions and 1 deletions

View File

@@ -1,4 +1,9 @@
import type { NextConfig } from 'next';
import bundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
const nextConfig: NextConfig = {
output: 'export',
@@ -19,4 +24,4 @@ const nextConfig: NextConfig = {
},
};
export default nextConfig;
export default withBundleAnalyzer(nextConfig);