diff --git a/web/next.config.js b/web/next.config.js index c4f6fc87b6..212bed0a9c 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -1,4 +1,7 @@ const { codeInspectorPlugin } = require('code-inspector-plugin') + +const isDev = process.env.NODE_ENV === 'development' + const withPWA = require('next-pwa')({ dest: 'public', register: true, @@ -137,6 +140,9 @@ const nextConfig = { ] }, output: 'standalone', + compiler: { + removeConsole: isDev ? false : { exclude: ['warn', 'error'] }, + } } module.exports = withPWA(withBundleAnalyzer(withMDX(nextConfig)))