2025-11-20 21:12:38 +01:00
|
|
|
import type { NextConfig } from 'next';
|
2025-11-21 16:54:49 +01:00
|
|
|
import bundleAnalyzer from '@next/bundle-analyzer';
|
|
|
|
|
|
|
|
|
|
const withBundleAnalyzer = bundleAnalyzer({
|
|
|
|
|
enabled: process.env.ANALYZE === 'true',
|
|
|
|
|
});
|
2025-11-20 21:12:38 +01:00
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
|
|
|
|
output: 'export',
|
|
|
|
|
reactStrictMode: true,
|
|
|
|
|
// Turbopack configuration (Next.js 16+)
|
|
|
|
|
turbopack: {},
|
|
|
|
|
// Webpack fallback for older Next.js versions
|
|
|
|
|
webpack: (config) => {
|
|
|
|
|
// Required for Canvas API and Web Workers
|
|
|
|
|
config.resolve.fallback = {
|
|
|
|
|
...config.resolve.fallback,
|
|
|
|
|
fs: false,
|
|
|
|
|
path: false,
|
|
|
|
|
crypto: false,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return config;
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-21 16:54:49 +01:00
|
|
|
export default withBundleAnalyzer(nextConfig);
|