mirror of https://github.com/langgenius/dify.git
feat(next.config): add console log removal configuration for production
This commit is contained in:
parent
57c65ec625
commit
282fde9a04
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Reference in New Issue