From 17c21305e1b3ed3865d56632bd4402596ca16a2a Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 5 Feb 2025 17:23:56 -0500 Subject: [PATCH] try this config --- next.config.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/next.config.js b/next.config.js index 2a66511..fcaec90 100644 --- a/next.config.js +++ b/next.config.js @@ -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)