23 lines
631 B
JavaScript
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)
|
|
}
|