laconic-dot-com/next.config.js
zramsay 8a7c4b7ccf
All checks were successful
/ registry_publish (push) Successful in 1m42s
another config
2025-02-05 17:29:48 -05:00

23 lines
631 B
JavaScript

const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
webpack: (config) => {
// Let the build script handle the DefinePlugin injection
// The script will add the envMap DefinePlugin automatically
return config
}
}
if (process.env.NODE_ENV === 'production') {
// Let the build script transform this
const __orig_cfg__ = withBundleAnalyzer(nextConfig)
} else {
// For development, export directly
module.exports = withBundleAnalyzer(nextConfig)
}