feat: convert components to dynamic imports for improved performance (#22614)
This commit is contained in:
@@ -12,6 +12,9 @@ const withMDX = require('@next/mdx')({
|
||||
// providerImportSource: "@mdx-js/react",
|
||||
},
|
||||
})
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
})
|
||||
|
||||
// the default url to prevent parse url error when running jest
|
||||
const hasSetWebPrefix = process.env.NEXT_PUBLIC_WEB_PREFIX
|
||||
@@ -66,4 +69,4 @@ const nextConfig = {
|
||||
output: 'standalone',
|
||||
}
|
||||
|
||||
module.exports = withMDX(nextConfig)
|
||||
module.exports = withBundleAnalyzer(withMDX(nextConfig))
|
||||
|
Reference in New Issue
Block a user