also try this config
All checks were successful
/ registry_publish (push) Successful in 1m41s

This commit is contained in:
zramsay 2025-02-05 17:24:23 -05:00
parent 17c21305e1
commit 82307585bd

View File

@ -1,16 +1,23 @@
// next.config.js
const webpack = require('webpack')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
const envMap = Object.keys(process.env)
.filter(key => key.startsWith('CERC_'))
.reduce((acc, key) => {
acc[`process.env.${key}`] = JSON.stringify(process.env[key])
return acc
}, {})
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
webpack: (config) => {
// Let the build script inject the DefinePlugin
config.plugins.push(new webpack.DefinePlugin(envMap))
return config
}
}
// Export directly - let the build script handle the transformation
module.exports = withBundleAnalyzer(nextConfig)