diff --git a/packages/next-swc/crates/next-core/src/next_config.rs b/packages/next-swc/crates/next-core/src/next_config.rs index d282c705355b4..dcf93464d83c8 100644 --- a/packages/next-swc/crates/next-core/src/next_config.rs +++ b/packages/next-swc/crates/next-core/src/next_config.rs @@ -109,7 +109,6 @@ pub struct NextConfig { generate_etags: bool, http_agent_options: HttpAgentConfig, on_demand_entries: OnDemandEntriesConfig, - output_file_tracing: bool, powered_by_header: bool, production_browser_source_maps: bool, public_runtime_config: IndexMap, diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 21ed84f7ebb5b..b5a6ac4ba3e8e 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -2383,7 +2383,7 @@ export default async function build( await writeFunctionsConfigManifest(distDir, functionsConfigManifest) - if (!isGenerateMode && config.outputFileTracing && !buildTracesPromise) { + if (!isGenerateMode && !buildTracesPromise) { buildTracesPromise = collectBuildTraces({ dir, config, diff --git a/packages/next/src/build/utils.ts b/packages/next/src/build/utils.ts index 469882a70c61a..dff105b04559b 100644 --- a/packages/next/src/build/utils.ts +++ b/packages/next/src/build/utils.ts @@ -1769,12 +1769,6 @@ export async function isPageStatic({ ? {} : componentsResult.pageConfig - if (config.unstable_includeFiles || config.unstable_excludeFiles) { - Log.warn( - `unstable_includeFiles/unstable_excludeFiles has been removed in favor of the option in next.config.js.\nSee more info here: https://nextjs.org/docs/advanced-features/output-file-tracing#caveats` - ) - } - let isStatic = false if (!hasStaticProps && !hasGetInitialProps && !hasServerProps) { isStatic = true diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 6417163780d3e..c647a922fb179 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -1761,8 +1761,7 @@ export default async function getBaseWebpackConfig( dev, }), (isClient || isEdgeServer) && new DropClientPage(), - config.outputFileTracing && - isNodeServer && + isNodeServer && !dev && new (require('./webpack/plugins/next-trace-entrypoints-plugin') .TraceEntryPointsPlugin as typeof import('./webpack/plugins/next-trace-entrypoints-plugin').TraceEntryPointsPlugin)( diff --git a/packages/next/src/lib/turbopack-warning.ts b/packages/next/src/lib/turbopack-warning.ts index b01c263a0902e..f44e23cef2f07 100644 --- a/packages/next/src/lib/turbopack-warning.ts +++ b/packages/next/src/lib/turbopack-warning.ts @@ -51,7 +51,6 @@ const unsupportedTurbopackNextConfigOptions = [ // The following will need to be supported by `next build --turbo` const unsupportedProductionSpecificTurbopackNextConfigOptions = [ - 'outputFileTracing', // TODO: Support disabling sourcemaps, currently they're always enabled. // 'productionBrowserSourceMaps', 'reactProductionProfiling', diff --git a/packages/next/src/server/config-schema.ts b/packages/next/src/server/config-schema.ts index 3ce749f863ae1..b62d3a998fc93 100644 --- a/packages/next/src/server/config-schema.ts +++ b/packages/next/src/server/config-schema.ts @@ -541,7 +541,6 @@ export const configSchema: zod.ZodType = z.lazy(() => .optional(), optimizeFonts: z.boolean().optional(), output: z.enum(['standalone', 'export']).optional(), - outputFileTracing: z.boolean().optional(), pageExtensions: z.array(z.string()).min(1).optional(), poweredByHeader: z.boolean().optional(), productionBrowserSourceMaps: z.boolean().optional(), diff --git a/packages/next/src/server/config-shared.ts b/packages/next/src/server/config-shared.ts index 8936702869529..694acfb3d01d2 100644 --- a/packages/next/src/server/config-shared.ts +++ b/packages/next/src/server/config-shared.ts @@ -224,17 +224,7 @@ export interface ExperimentalConfig { * much as possible, even when this leads to many requests. */ cssChunking?: 'strict' | 'loose' - /** - * @deprecated use config.cacheHandler instead - */ - incrementalCacheHandlerPath?: string - /** - * @deprecated use config.cacheMaxMemorySize instead - * - */ - isrMemoryCacheSize?: number disablePostcssPresetEnv?: boolean - swcMinify?: boolean cpus?: number memoryBasedWorkersCount?: boolean proxyTimeout?: number @@ -728,16 +718,6 @@ export interface NextConfig extends Record { */ httpAgentOptions?: { keepAlive?: boolean } - /** - * During a build, Next.js will automatically trace each page and its dependencies to determine all of the files - * that are needed for deploying a production version of your application. - * - * @see [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing) - * @deprecated will be enabled by default and removed in Next.js 15 - * - */ - outputFileTracing?: boolean - /** * Timeout after waiting to generate static pages in seconds * @@ -753,14 +733,6 @@ export interface NextConfig extends Record { */ crossOrigin?: 'anonymous' | 'use-credentials' - /** - * Use [SWC compiler](https://swc.rs) to minify the generated JavaScript - * @deprecated will be enabled by default and removed in Next.js 15 - * - * @see [SWC Minification](https://nextjs.org/docs/advanced-features/compiler#minification) - */ - swcMinify?: boolean - /** * Optionally enable compiler transforms * @@ -895,7 +867,6 @@ export const defaultConfig: NextConfig = { httpAgentOptions: { keepAlive: true, }, - outputFileTracing: true, staticPageGenerationTimeout: 60, swcMinify: true, output: !!process.env.NEXT_PRIVATE_STANDALONE ? 'standalone' : undefined, diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index 5abaa77dc1b78..4f2850e2ecedc 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -465,56 +465,6 @@ function assignDefaults( } } - if (result.experimental?.incrementalCacheHandlerPath) { - // TODO: Remove this warning in Next.js 15 - warnOptionHasBeenDeprecated( - result, - 'experimental.incrementalCacheHandlerPath', - 'The "experimental.incrementalCacheHandlerPath" option has been renamed to "cacheHandler". Please update your next.config.js.', - silent - ) - } - - if (result.experimental?.isrMemoryCacheSize) { - // TODO: Remove this warning in Next.js 15 - warnOptionHasBeenDeprecated( - result, - 'experimental.isrMemoryCacheSize', - 'The "experimental.isrMemoryCacheSize" option has been renamed to "cacheMaxMemorySize". Please update your next.config.js.', - silent - ) - } - - if (typeof result.experimental?.serverActions === 'boolean') { - // TODO: Remove this warning in Next.js 15 - warnOptionHasBeenDeprecated( - result, - 'experimental.serverActions', - 'Server Actions are available by default now, `experimental.serverActions` option can be safely removed.', - silent - ) - } - - if (result.swcMinify === false) { - // TODO: Remove this warning in Next.js 15 - warnOptionHasBeenDeprecated( - result, - 'swcMinify', - 'Disabling SWC Minifier will not be an option in the next major version. Please report any issues you may be experiencing to https://github.com/vercel/next.js/issues', - silent - ) - } - - if (result.outputFileTracing === false) { - // TODO: Remove this warning in Next.js 15 - warnOptionHasBeenDeprecated( - result, - 'outputFileTracing', - 'Disabling outputFileTracing will not be an option in the next major version. Please report any issues you may be experiencing to https://github.com/vercel/next.js/issues', - silent - ) - } - warnOptionHasBeenMovedOutOfExperimental( result, 'relay', @@ -631,15 +581,6 @@ function assignDefaults( } } - if (result.output === 'standalone' && !result.outputFileTracing) { - if (!silent) { - Log.warn( - `"output: 'standalone'" requires outputFileTracing not be disabled please enable it to leverage the standalone build` - ) - } - result.output = undefined - } - setHttpClientAndAgentOptions(result || defaultConfig) if (result.i18n) { diff --git a/packages/next/src/types.ts b/packages/next/src/types.ts index 3654700bda54a..fbb2ffaee7faa 100644 --- a/packages/next/src/types.ts +++ b/packages/next/src/types.ts @@ -142,16 +142,6 @@ export type PageConfig = { runtime?: ServerRuntime unstable_runtimeJS?: false unstable_JsPreload?: false - /** - * @deprecated this config has been removed in favor of the next.config.js option - */ - // TODO: remove in next minor release (current v13.1.1) - unstable_includeFiles?: string[] - /** - * @deprecated this config has been removed in favor of the next.config.js option - */ - // TODO: remove in next minor release (current v13.1.1) - unstable_excludeFiles?: string[] } export type {