6254981980
* turn on source maps * add source-map-loader
20 lines
504 B
JavaScript
20 lines
504 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: false,
|
|
swcMinify: false,
|
|
productionBrowserSourceMaps: true,
|
|
webpack: (config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }) => {
|
|
// Important: return the modified config
|
|
config.module.rules = [
|
|
...config.module.rules,
|
|
{
|
|
test: /\.mjs$/,
|
|
enforce: 'pre',
|
|
use: ['source-map-loader'],
|
|
},
|
|
];
|
|
return config;
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|