mirror of
https://github.com/langgenius/dify.git
synced 2026-01-14 06:07:33 +08:00
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
Block a user