feat: convert components to dynamic imports for improved performance (#22614)
This commit is contained in:
parent
1f9cd99bc2
commit
b035f3f884
37 changed files with 493 additions and 472 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue