meet/next.config.mjs
2024-08-22 11:43:48 +02:00

25 lines
697 B
JavaScript

import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
productionBrowserSourceMaps: true,
webpack: (config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }) => {
// Important: return the modified config
config.module.rules.push({
test: /\.mjs$/,
enforce: 'pre',
use: ['source-map-loader'],
});
return config;
},
};
// This allows you to access Cloudflare bindings in local development.
// Ignore this, you probably don't need it.
if (process.env.NODE_ENV === 'development') {
await setupDevPlatform();
}
export default nextConfig;