Unverified Commit 9eceb955 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Move outputFileTracing config up (#30295)

* Move outputFileTracing config up

* remove old nftTracing config

* remove old config
Co-authored-by: 's avatarSteven <steven@ceriously.com>
parent 9101df75
......@@ -877,7 +877,7 @@ export default async function build(
)
})
if (config.experimental.outputFileTracing) {
if (config.outputFileTracing) {
pageTraceIncludes.set(page, workerResult.traceIncludes || [])
pageTraceExcludes.set(page, workerResult.traceExcludes || [])
}
......@@ -1021,7 +1021,7 @@ export default async function build(
)
}
if (config.experimental.outputFileTracing) {
if (config.outputFileTracing) {
const { nodeFileTrace } =
require('next/dist/compiled/@vercel/nft') as typeof import('next/dist/compiled/@vercel/nft')
......
......@@ -1229,7 +1229,7 @@ export default async function getBaseWebpackConfig(
pagesDir,
}),
!isServer && new DropClientPage(),
config.experimental.outputFileTracing &&
config.outputFileTracing &&
!isLikeServerless &&
isServer &&
!dev &&
......
......@@ -116,6 +116,7 @@ export type NextConfig = { [key: string]: any } & {
webpack5?: false
strictPostcssConfiguration?: boolean
}
outputFileTracing?: boolean
staticPageGenerationTimeout?: number
crossOrigin?: false | 'anonymous' | 'use-credentials'
swcMinify?: boolean
......@@ -145,7 +146,6 @@ export type NextConfig = { [key: string]: any } & {
craCompat?: boolean
esmExternals?: boolean | 'loose'
isrMemoryCacheSize?: number
outputFileTracing?: boolean
concurrentFeatures?: boolean
serverComponents?: boolean
fullySpecified?: boolean
......@@ -201,6 +201,7 @@ export const defaultConfig: NextConfig = {
httpAgentOptions: {
keepAlive: true,
},
outputFileTracing: true,
staticPageGenerationTimeout: 60,
swcMinify: false,
experimental: {
......@@ -226,7 +227,6 @@ export const defaultConfig: NextConfig = {
esmExternals: true,
// default to 50MB limit
isrMemoryCacheSize: 50 * 1024 * 1024,
outputFileTracing: true,
concurrentFeatures: false,
serverComponents: false,
fullySpecified: false,
......
......@@ -371,16 +371,6 @@ function assignDefaults(userConfig: { [key: string]: any }) {
)
}
if (result.experimental && 'nftTracing' in (result.experimental as any)) {
// TODO: remove this warning and assignment when we leave experimental phase
Log.warn(
`Experimental \`nftTracing\` has been renamed to \`outputFileTracing\`. Please update your ${configFileName} file accordingly.`
)
result.experimental.outputFileTracing = (
result.experimental as any
).nftTracing
}
// TODO: Change defaultConfig type to NextConfigComplete
// so we don't need "!" here.
setHttpAgentOptions(
......
......@@ -20,11 +20,6 @@ describe('prerender native module', () => {
sqlite: '4.0.22',
sqlite3: '5.0.2',
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
},
})
})
afterAll(() => next.destroy())
......
......@@ -28,9 +28,6 @@ describe('Prerender', () => {
firebase: '7.14.5',
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
async rewrites() {
return [
{
......
const path = require('path')
module.exports = {
experimental: {
outputFileTracing: true,
},
webpack(cfg, { isServer }) {
console.log(cfg.entry)
const origEntry = cfg.entry
......
......@@ -3,9 +3,6 @@ setInterval(() => {}, 250)
module.exports = {
swcMinify: true,
experimental: {
outputFileTracing: true,
},
onDemandEntries: {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
......
......@@ -2,9 +2,6 @@
setInterval(() => {}, 250)
module.exports = {
experimental: {
outputFileTracing: true,
},
onDemandEntries: {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
......
......@@ -30,9 +30,6 @@ describe('should set-up next', () => {
),
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
eslint: {
ignoreDuringBuilds: true,
},
......
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