laconic-dot-com/next.config.js
zramsay 82307585bd
All checks were successful
/ registry_publish (push) Successful in 1m41s
also try this config
2025-02-05 17:24:23 -05:00

24 lines
581 B
JavaScript

// 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) => {
config.plugins.push(new webpack.DefinePlugin(envMap))
return config
}
}
module.exports = withBundleAnalyzer(nextConfig)