feat: Enable React Compiler for automatic memoization

- Install babel-plugin-react-compiler@1.0.0
- Add reactCompiler: true to next.config.mjs
- React 19 compiler will auto-optimize useMemo/useCallback
This commit is contained in:
2026-01-19 22:47:01 +01:00
parent 096daffb3e
commit 004698b604
3 changed files with 19 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ const nextConfig = {
output: 'standalone',
// Enable source maps for Sentry stack traces in production
productionBrowserSourceMaps: !!process.env.GLITCHTIP_DSN,
// React Compiler for automatic memoization (React 19+)
reactCompiler: true,
experimental: {
serverActions: {
bodySizeLimit: '10mb',