feat: convert components to dynamic imports for improved performance (#22614)

This commit is contained in:
Wu Tianwei
2025-07-18 11:43:37 +08:00
committed by GitHub
parent 1f9cd99bc2
commit b035f3f884
37 changed files with 493 additions and 472 deletions

View File

@@ -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))