32 lines
705 B
TypeScript
32 lines
705 B
TypeScript
|
|
import type { NextConfig } from 'next';
|
||
|
|
|
||
|
|
const nextConfig: NextConfig = {
|
||
|
|
reactStrictMode: true,
|
||
|
|
|
||
|
|
// React Compiler disabled for now (requires babel-plugin-react-compiler)
|
||
|
|
// experimental: {
|
||
|
|
// reactCompiler: true,
|
||
|
|
// },
|
||
|
|
|
||
|
|
// Image optimization
|
||
|
|
images: {
|
||
|
|
formats: ['image/avif', 'image/webp'],
|
||
|
|
},
|
||
|
|
|
||
|
|
// Bundle analyzer (conditional)
|
||
|
|
...(process.env.ANALYZE === 'true' && {
|
||
|
|
webpack(config) {
|
||
|
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||
|
|
config.plugins.push(
|
||
|
|
new BundleAnalyzerPlugin({
|
||
|
|
analyzerMode: 'static',
|
||
|
|
openAnalyzer: false,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
return config;
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
};
|
||
|
|
|
||
|
|
export default nextConfig;
|