This commit is contained in:
parent
a6f5db0285
commit
17c21305e1
@ -1,10 +1,16 @@
|
||||
const withPlugins = require('next-compose-plugins')
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')
|
||||
// next.config.js
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
enabled: process.env.ANALYZE === 'true'
|
||||
})
|
||||
|
||||
module.exports = withPlugins(
|
||||
[withBundleAnalyzer({ enabled: process.env.ANALYZE === 'true' })],
|
||||
{
|
||||
reactStrictMode: false,
|
||||
swcMinify: true
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
swcMinify: true,
|
||||
webpack: (config) => {
|
||||
// Let the build script inject the DefinePlugin
|
||||
return config
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// Export directly - let the build script handle the transformation
|
||||
module.exports = withBundleAnalyzer(nextConfig)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user