Files
paint-ui/next.config.ts

28 lines
650 B
TypeScript
Raw Permalink Normal View History

import type { NextConfig } from 'next';
import bundleAnalyzer from '@next/bundle-analyzer';
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
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;
},
};
export default withBundleAnalyzer(nextConfig);