Unverified Commit 31a011d6 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Adjust configuration option placement (#18279)

parent 9d838df7
......@@ -1163,7 +1163,7 @@ export default async function build(
printCustomRoutes({ redirects, rewrites, headers })
}
if (config.experimental.analyticsId) {
if (config.analyticsId) {
console.log(
chalk.bold.green('Next.js Analytics') +
' is enabled for this production build. ' +
......
......@@ -1010,9 +1010,7 @@ export default async function getBaseWebpackConfig(
'process.env.__NEXT_I18N_DOMAINS': JSON.stringify(
config.experimental.i18n.domains
),
'process.env.__NEXT_ANALYTICS_ID': JSON.stringify(
config.experimental.analyticsId
),
'process.env.__NEXT_ANALYTICS_ID': JSON.stringify(config.analyticsId),
...(isServer
? {
// Fix bad-actors in the npm ecosystem (e.g. `node-formidable`)
......
......@@ -23,6 +23,7 @@ const defaultConfig: { [key: string]: any } = {
target: 'server',
poweredByHeader: true,
compress: true,
analyticsId: process.env.VERCEL_ANALYTICS_ID || '',
images: {
deviceSizes: [320, 420, 768, 1024, 1200],
iconSizes: [],
......@@ -62,7 +63,6 @@ const defaultConfig: { [key: string]: any } = {
optimizeImages: false,
scrollRestoration: false,
i18n: false,
analyticsId: process.env.VERCEL_ANALYTICS_ID || '',
},
future: {
excludeDefaultMomentLocales: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment