diff --git a/next.config.js b/next.config.js index 47b7db87b..325aeb96e 100644 --- a/next.config.js +++ b/next.config.js @@ -8,7 +8,12 @@ module.exports = { reactStrictMode: true, i18n, output: 'standalone', - webpack: (config, { webpack, isServer }) => { + webpack: (config, { dev, webpack, isServer }) => { + // Enable source maps in development mode and for server-side rendering + if (!dev && isServer) { + config.devtool = 'source-map'; + } + if (isServer) { // Module not found config.plugins.push(