Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move outputFileTracing config up #30295

Merged
merged 7 commits into from Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/next/build/index.ts
Expand Up @@ -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 || [])
}
Expand Down Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Expand Up @@ -1229,7 +1229,7 @@ export default async function getBaseWebpackConfig(
pagesDir,
}),
!isServer && new DropClientPage(),
config.experimental.outputFileTracing &&
config.outputFileTracing &&
!isLikeServerless &&
isServer &&
!dev &&
Expand Down
4 changes: 2 additions & 2 deletions packages/next/server/config-shared.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -201,6 +201,7 @@ export const defaultConfig: NextConfig = {
httpAgentOptions: {
keepAlive: true,
},
outputFileTracing: true,
staticPageGenerationTimeout: 60,
swcMinify: false,
experimental: {
Expand All @@ -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,
Expand Down
10 changes: 0 additions & 10 deletions packages/next/server/config.ts
Expand Up @@ -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(
Expand Down
5 changes: 0 additions & 5 deletions test/e2e/prerender-native-module.test.ts
Expand Up @@ -20,11 +20,6 @@ describe('prerender native module', () => {
sqlite: '4.0.22',
sqlite3: '5.0.2',
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
},
})
})
afterAll(() => next.destroy())
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/prerender.test.ts
Expand Up @@ -28,9 +28,6 @@ describe('Prerender', () => {
firebase: '7.14.5',
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
async rewrites() {
return [
{
Expand Down
@@ -1,9 +1,6 @@
const path = require('path')

module.exports = {
experimental: {
outputFileTracing: true,
},
webpack(cfg, { isServer }) {
console.log(cfg.entry)
const origEntry = cfg.entry
Expand Down
3 changes: 0 additions & 3 deletions test/integration/production-swcminify/next.config.js
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions test/integration/production/next.config.js
Expand Up @@ -2,9 +2,6 @@
setInterval(() => {}, 250)

module.exports = {
experimental: {
outputFileTracing: true,
},
onDemandEntries: {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
Expand Down
3 changes: 0 additions & 3 deletions test/production/required-server-files.test.ts
Expand Up @@ -30,9 +30,6 @@ describe('should set-up next', () => {
),
},
nextConfig: {
experimental: {
outputFileTracing: true,
},
eslint: {
ignoreDuringBuilds: true,
},
Expand Down