25 lines
697 B
JavaScript
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;
|