diff --git a/crates/next-build-test/nextConfig.json b/crates/next-build-test/nextConfig.json index 0cc9f3f2f0331..ec270b0bd15c0 100644 --- a/crates/next-build-test/nextConfig.json +++ b/crates/next-build-test/nextConfig.json @@ -50,8 +50,6 @@ "productionBrowserSourceMaps": false, "optimizeFonts": true, "excludeDefaultMomentLocales": true, - "serverRuntimeConfig": {}, - "publicRuntimeConfig": {}, "reactProductionProfiling": false, "reactStrictMode": true, "httpAgentOptions": { diff --git a/docs/01-app/02-guides/environment-variables.mdx b/docs/01-app/02-guides/environment-variables.mdx index 809d4871cd992..83917914232fd 100644 --- a/docs/01-app/02-guides/environment-variables.mdx +++ b/docs/01-app/02-guides/environment-variables.mdx @@ -228,7 +228,6 @@ This allows you to use a singular Docker image that can be promoted through mult **Good to know:** - You can run code on server startup using the [`register` function](/docs/app/guides/instrumentation). -- We do not recommend using the [`runtimeConfig`](/docs/pages/api-reference/config/next-config-js/runtime-configuration) option, as this does not work with the standalone output mode. Instead, we recommend [incrementally adopting](/docs/app/guides/migrating/app-router-migration) the App Router if you need this feature. ## Test Environment Variables diff --git a/docs/01-app/02-guides/self-hosting.mdx b/docs/01-app/02-guides/self-hosting.mdx index c09f87d050104..9e161028cdede 100644 --- a/docs/01-app/02-guides/self-hosting.mdx +++ b/docs/01-app/02-guides/self-hosting.mdx @@ -79,7 +79,6 @@ This allows you to use a singular Docker image that can be promoted through mult > **Good to know:** > > - You can run code on server startup using the [`register` function](/docs/app/guides/instrumentation). -> - We do not recommend using the [runtimeConfig](/docs/pages/api-reference/config/next-config-js/runtime-configuration) option, as this does not work with the standalone output mode. Instead, we recommend [incrementally adopting](/docs/app/guides/migrating/app-router-migration) the App Router. ## Caching and ISR diff --git a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx index 4d068fa1bba8d..ee010ca94702f 100644 --- a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx +++ b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx @@ -59,7 +59,7 @@ node .next/standalone/server.js > **Good to know**: > -> - `next.config.js` is read during `next build` and serialized into the `server.js` output file. If the legacy [`serverRuntimeConfig` or `publicRuntimeConfig` options](/docs/pages/api-reference/config/next-config-js/runtime-configuration) are being used, the values will be specific to values at build time. +> - `next.config.js` is read during `next build` and serialized into the `server.js` output file. > - If your project needs to listen to a specific port or hostname, you can define `PORT` or `HOSTNAME` environment variables before running `server.js`. For example, run `PORT=8080 HOSTNAME=0.0.0.0 node server.js` to start the server on `http://0.0.0.0:8080`. diff --git a/docs/02-pages/04-api-reference/04-config/01-next-config-js/runtime-configuration.mdx b/docs/02-pages/04-api-reference/04-config/01-next-config-js/runtime-configuration.mdx deleted file mode 100644 index 879394ea38dd4..0000000000000 --- a/docs/02-pages/04-api-reference/04-config/01-next-config-js/runtime-configuration.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Runtime Config -description: Add client and server runtime configuration to your Next.js app. ---- - -> **Warning:** -> -> - **This feature is deprecated.** We recommend using [environment variables](/docs/pages/guides/environment-variables) instead, which also can support reading runtime values. -> - You can run code on server startup using the [`register` function](/docs/app/guides/instrumentation). -> - This feature does not work with [Automatic Static Optimization](/docs/pages/building-your-application/rendering/automatic-static-optimization), [Output File Tracing](/docs/pages/api-reference/config/next-config-js/output#automatically-copying-traced-files), or [React Server Components](/docs/app/getting-started/server-and-client-components). - -To add runtime configuration to your app, open `next.config.js` and add the `publicRuntimeConfig` and `serverRuntimeConfig` configs: - -```js filename="next.config.js" -module.exports = { - serverRuntimeConfig: { - // Will only be available on the server side - mySecret: 'secret', - secondSecret: process.env.SECOND_SECRET, // Pass through env variables - }, - publicRuntimeConfig: { - // Will be available on both server and client - staticFolder: '/static', - }, -} -``` - -Place any server-only runtime config under `serverRuntimeConfig`. - -Anything accessible to both client and server-side code should be under `publicRuntimeConfig`. - -> A page that relies on `publicRuntimeConfig` **must** use `getInitialProps` or `getServerSideProps` or your application must have a [Custom App](/docs/pages/building-your-application/routing/custom-app) with `getInitialProps` to opt-out of [Automatic Static Optimization](/docs/pages/building-your-application/rendering/automatic-static-optimization). Runtime configuration won't be available to any page (or component in a page) without being server-side rendered. - -To get access to the runtime configs in your app use `next/config`, like so: - -```jsx -import getConfig from 'next/config' -import Image from 'next/image' - -// Only holds serverRuntimeConfig and publicRuntimeConfig -const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() -// Will only be available on the server-side -console.log(serverRuntimeConfig.mySecret) -// Will be available on both server-side and client-side -console.log(publicRuntimeConfig.staticFolder) - -function MyImage() { - return ( -
- logo -
- ) -} - -export default MyImage -``` diff --git a/packages/next/config.d.ts b/packages/next/config.d.ts deleted file mode 100644 index 20c292fb467ef..0000000000000 --- a/packages/next/config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import getConfig from './dist/shared/lib/runtime-config.external' -export * from './dist/shared/lib/runtime-config.external' -export default getConfig diff --git a/packages/next/config.js b/packages/next/config.js deleted file mode 100644 index dd6f7b1f12536..0000000000000 --- a/packages/next/config.js +++ /dev/null @@ -1,12 +0,0 @@ -let hasWarned = false - -module.exports = (() => { - if (!hasWarned) { - console.warn( - // ANSI code aligns with Next.js warning style from picocolors. - ' \x1b[33m\x1b[1m⚠\x1b[22m\x1b[39m Runtime config is deprecated and will be removed in Next.js 16. Please remove the usage of "next/config" from your project.' - ) - hasWarned = true - } - return require('./dist/shared/lib/runtime-config.external') -})() diff --git a/packages/next/index.d.ts b/packages/next/index.d.ts index 93e225bbb3212..2b0b7171b0f97 100644 --- a/packages/next/index.d.ts +++ b/packages/next/index.d.ts @@ -3,7 +3,6 @@ /// /// /// -/// /// /// /// diff --git a/packages/next/package.json b/packages/next/package.json index 2d0d3c394cdf4..8d2d0bb2f8ff4 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -19,8 +19,6 @@ "compat", "cache.js", "cache.d.ts", - "config.js", - "config.d.ts", "constants.js", "constants.d.ts", "document.js", diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index fd059406d324a..686b4f7935124 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -1924,9 +1924,7 @@ export default async function build( } } - const { configFileName, publicRuntimeConfig, serverRuntimeConfig } = - config - const runtimeEnvConfig = { publicRuntimeConfig, serverRuntimeConfig } + const { configFileName } = config const sriEnabled = Boolean(config.experimental.sri?.algorithm) const nonStaticErrorPageSpan = staticCheckSpan.traceChild( @@ -1939,7 +1937,6 @@ export default async function build( (await worker.hasCustomGetInitialProps({ page: '/_error', distDir, - runtimeEnvConfig, checkingApp: false, sriEnabled, })) @@ -1953,7 +1950,6 @@ export default async function build( page: '/_error', distDir, configFileName, - runtimeEnvConfig, cacheComponents: isAppCacheComponentsEnabled, authInterrupts: isAuthInterruptsEnabled, httpAgentOptions: config.httpAgentOptions, @@ -1973,7 +1969,6 @@ export default async function build( ? worker.hasCustomGetInitialProps({ page: appPageToCheck, distDir, - runtimeEnvConfig, checkingApp: true, sriEnabled, }) @@ -1983,7 +1978,6 @@ export default async function build( ? worker.getDefinedNamedExports({ page: appPageToCheck, distDir, - runtimeEnvConfig, sriEnabled, }) : Promise.resolve([]) @@ -2167,7 +2161,6 @@ export default async function build( originalAppPath, distDir, configFileName, - runtimeEnvConfig, httpAgentOptions: config.httpAgentOptions, locales: config.i18n?.locales, defaultLocale: config.i18n?.defaultLocale, diff --git a/packages/next/src/build/templates/edge-ssr.ts b/packages/next/src/build/templates/edge-ssr.ts index 190a4a50abe82..4c1b201f87055 100644 --- a/packages/next/src/build/templates/edge-ssr.ts +++ b/packages/next/src/build/templates/edge-ssr.ts @@ -153,12 +153,6 @@ async function requestHandler( distDir: '', crossOrigin: nextConfig.crossOrigin ? nextConfig.crossOrigin : undefined, largePageDataBytes: nextConfig.experimental.largePageDataBytes, - // Only the `publicRuntimeConfig` key is exposed to the client side - // It'll be rendered as part of __NEXT_DATA__ on the client side - runtimeConfig: - Object.keys(nextConfig.publicRuntimeConfig).length > 0 - ? nextConfig.publicRuntimeConfig - : undefined, isExperimentalCompile: nextConfig.experimental.isExperimentalCompile, // `htmlLimitedBots` is passed to server as serialized config in string format diff --git a/packages/next/src/build/utils.ts b/packages/next/src/build/utils.ts index c47c6fb20e2c6..a28a6a6ca4471 100644 --- a/packages/next/src/build/utils.ts +++ b/packages/next/src/build/utils.ts @@ -626,7 +626,6 @@ export async function isPageStatic({ page, distDir, configFileName, - runtimeEnvConfig, httpAgentOptions, locales, defaultLocale, @@ -653,7 +652,6 @@ export async function isPageStatic({ cacheComponents: boolean authInterrupts: boolean configFileName: string - runtimeEnvConfig: any httpAgentOptions: NextConfigComplete['httpAgentOptions'] locales?: readonly string[] defaultLocale?: string @@ -701,9 +699,6 @@ export async function isPageStatic({ const isPageStaticSpan = trace('is-page-static-utils', parentId) return isPageStaticSpan .traceAsyncFn(async (): Promise => { - ;( - require('../shared/lib/runtime-config.external') as typeof import('../shared/lib/runtime-config.external') - ).setConfig(runtimeEnvConfig) setHttpClientAndAgentOptions({ httpAgentOptions, }) @@ -1003,20 +998,14 @@ export function reduceAppConfig( export async function hasCustomGetInitialProps({ page, distDir, - runtimeEnvConfig, checkingApp, sriEnabled, }: { page: string distDir: string - runtimeEnvConfig: any checkingApp: boolean sriEnabled: boolean }): Promise { - ;( - require('../shared/lib/runtime-config.external') as typeof import('../shared/lib/runtime-config.external') - ).setConfig(runtimeEnvConfig) - const { ComponentMod } = await loadComponents({ distDir, page: page, @@ -1039,17 +1028,12 @@ export async function hasCustomGetInitialProps({ export async function getDefinedNamedExports({ page, distDir, - runtimeEnvConfig, sriEnabled, }: { page: string distDir: string - runtimeEnvConfig: any sriEnabled: boolean }): Promise> { - ;( - require('../shared/lib/runtime-config.external') as typeof import('../shared/lib/runtime-config.external') - ).setConfig(runtimeEnvConfig) const { ComponentMod } = await loadComponents({ distDir, page: page, diff --git a/packages/next/src/client/index.tsx b/packages/next/src/client/index.tsx index d63875b6b0590..81fdc33f88e95 100644 --- a/packages/next/src/client/index.tsx +++ b/packages/next/src/client/index.tsx @@ -20,7 +20,6 @@ import { urlQueryToSearchParams, assign, } from '../shared/lib/router/utils/querystring' -import { setConfig } from '../shared/lib/runtime-config.external' import { getURL, loadGetInitialProps, ST } from '../shared/lib/utils' import type { NextWebVitalsMetric, NEXT_DATA } from '../shared/lib/utils' import { Portal } from './portal' @@ -212,12 +211,6 @@ export async function initialize(opts: { devClient?: any } = {}): Promise<{ // So, this is how we do it in the client side at runtime ;(self as any).__next_set_public_path__(`${prefix}/_next/`) //eslint-disable-line - // Initialize next/config with the environment configuration - setConfig({ - serverRuntimeConfig: {}, - publicRuntimeConfig: initialData.runtimeConfig || {}, - }) - asPath = getURL() // make sure not to attempt stripping basePath for 404s diff --git a/packages/next/src/export/index.ts b/packages/next/src/export/index.ts index 01022102e55fd..ae33e0f6e3bd0 100644 --- a/packages/next/src/export/index.ts +++ b/packages/next/src/export/index.ts @@ -417,12 +417,6 @@ async function exportAppImpl( nextConfig.experimental.enablePrerenderSourceMaps === true, } - const { publicRuntimeConfig } = nextConfig - - if (Object.keys(publicRuntimeConfig).length > 0) { - renderOpts.runtimeConfig = publicRuntimeConfig - } - // We need this for server rendering the Link component. ;(globalThis as any).__NEXT_DATA__ = { nextExport: true, diff --git a/packages/next/src/export/types.ts b/packages/next/src/export/types.ts index 7514fe3bc78a8..0e1bb61fa56f8 100644 --- a/packages/next/src/export/types.ts +++ b/packages/next/src/export/types.ts @@ -44,7 +44,6 @@ export interface ExportPageInput { renderOpts: WorkerRenderOptsPartial trailingSlash?: boolean buildExport?: boolean - serverRuntimeConfig: { [key: string]: any } subFolders?: boolean optimizeCss: any disableOptimizedLoading: any diff --git a/packages/next/src/export/worker.ts b/packages/next/src/export/worker.ts index d2b89f71c5ab4..43b4436fba3dd 100644 --- a/packages/next/src/export/worker.ts +++ b/packages/next/src/export/worker.ts @@ -50,10 +50,6 @@ import type { PagesRenderContext, PagesSharedContext } from '../server/render' import type { AppSharedContext } from '../server/app-render/app-render' import { MultiFileWriter } from '../lib/multi-file-writer' import { createRenderResumeDataCache } from '../server/resume-data-cache/resume-data-cache' - -const envConfig = - require('../shared/lib/runtime-config.external') as typeof import('../shared/lib/runtime-config.external') - ;(globalThis as any).__NEXT_DATA__ = { nextExport: true, } @@ -75,7 +71,6 @@ async function exportPageImpl( distDir, pagesDataDir, buildExport = false, - serverRuntimeConfig, subFolders = false, optimizeCss, disableOptimizedLoading, @@ -189,11 +184,6 @@ async function exportPageImpl( addRequestMeta(req, 'isLocaleDomain', true) } - envConfig.setConfig({ - serverRuntimeConfig, - publicRuntimeConfig: commonRenderOpts.runtimeConfig, - }) - const getHtmlFilename = (p: string) => subFolders ? `${p}${sep}index.html` : `${p}.html` @@ -402,7 +392,6 @@ export async function exportPages( pagesDataDir, renderOpts, trailingSlash: nextConfig.trailingSlash, - serverRuntimeConfig: nextConfig.serverRuntimeConfig, subFolders: nextConfig.trailingSlash && !options.buildExport, buildExport: options.buildExport, optimizeCss: nextConfig.experimental.optimizeCss, diff --git a/packages/next/src/server/base-server.ts b/packages/next/src/server/base-server.ts index c1bf52279e8f6..27770b9d3f944 100644 --- a/packages/next/src/server/base-server.ts +++ b/packages/next/src/server/base-server.ts @@ -57,7 +57,6 @@ import { UNDERSCORE_NOT_FOUND_ROUTE_ENTRY, } from '../shared/lib/constants' import { isDynamicRoute } from '../shared/lib/router/utils' -import { setConfig } from '../shared/lib/runtime-config.external' import { execOnce } from '../shared/lib/utils' import { isBlockedPage } from './utils' import { getBotType, isBot } from '../shared/lib/router/utils/is-bot' @@ -476,14 +475,7 @@ export default abstract class Server< ? new LocaleRouteNormalizer(this.i18nProvider) : undefined - // Only serverRuntimeConfig needs the default - // publicRuntimeConfig gets it's default in client/index.js - const { - serverRuntimeConfig = {}, - publicRuntimeConfig, - assetPrefix, - generateEtags, - } = this.nextConfig + const { assetPrefix, generateEtags } = this.nextConfig this.buildId = this.getBuildId() // this is a hack to avoid Webpack knowing this is equal to this.minimalMode @@ -550,12 +542,6 @@ export default abstract class Server< ? this.nextConfig.crossOrigin : undefined, largePageDataBytes: this.nextConfig.experimental.largePageDataBytes, - // Only the `publicRuntimeConfig` key is exposed to the client side - // It'll be rendered as part of __NEXT_DATA__ on the client side - runtimeConfig: - Object.keys(publicRuntimeConfig).length > 0 - ? publicRuntimeConfig - : undefined, isExperimentalCompile: this.nextConfig.experimental.isExperimentalCompile, // `htmlLimitedBots` is passed to server as serialized config in string format @@ -582,12 +568,6 @@ export default abstract class Server< reactMaxHeadersLength: this.nextConfig.reactMaxHeadersLength, } - // Initialize next/config with the environment configuration - setConfig({ - serverRuntimeConfig, - publicRuntimeConfig, - }) - this.pagesManifest = this.getPagesManifest() this.appPathsManifest = this.getAppPathsManifest() this.appPathRoutes = this.getAppPathRoutes() diff --git a/packages/next/src/server/config-schema.ts b/packages/next/src/server/config-schema.ts index 31ddf66d65a7c..4edadfc771127 100644 --- a/packages/next/src/server/config-schema.ts +++ b/packages/next/src/server/config-schema.ts @@ -631,7 +631,6 @@ export const configSchema: zod.ZodType = z.lazy(() => pageExtensions: z.array(z.string()).min(1).optional(), poweredByHeader: z.boolean().optional(), productionBrowserSourceMaps: z.boolean().optional(), - publicRuntimeConfig: z.record(z.string(), z.any()).optional(), reactCompiler: z.union([ z.boolean(), z @@ -675,7 +674,6 @@ export const configSchema: zod.ZodType = z.lazy(() => .catchall(z.any()) .optional(), serverExternalPackages: z.array(z.string()).optional(), - serverRuntimeConfig: z.record(z.string(), z.any()).optional(), skipMiddlewareUrlNormalize: z.boolean().optional(), skipTrailingSlashRedirect: z.boolean().optional(), staticPageGenerationTimeout: z.number().optional(), diff --git a/packages/next/src/server/config-shared.ts b/packages/next/src/server/config-shared.ts index 4b6c4f3f7b32b..ead914161989f 100644 --- a/packages/next/src/server/config-shared.ts +++ b/packages/next/src/server/config-shared.ts @@ -1128,22 +1128,6 @@ export interface NextConfig { */ reactMaxHeadersLength?: number - /** - * Add public (in browser) runtime configuration to your app - * - * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration) - * @deprecated Runtime config is deprecated and will be removed in Next.js 16. - */ - publicRuntimeConfig?: { [key: string]: any } - - /** - * Add server runtime configuration to your app - * - * @see [Runtime configuration](https://nextjs.org/docs/pages/api-reference/config/next-config-js/runtime-configuration) - * @deprecated Runtime config is deprecated and will be removed in Next.js 16. - */ - serverRuntimeConfig?: { [key: string]: any } - /** * Next.js enables HTTP Keep-Alive by default. * You may want to disable HTTP Keep-Alive for certain `fetch()` calls or globally. @@ -1379,9 +1363,6 @@ export const defaultConfig = Object.freeze({ i18n: null, productionBrowserSourceMaps: false, excludeDefaultMomentLocales: true, - serverRuntimeConfig: {}, - publicRuntimeConfig: {}, - reactCompiler: undefined, reactProductionProfiling: false, reactStrictMode: null, reactMaxHeadersLength: 6000, diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index baa1a93e99422..e7f92c2d57423 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -117,19 +117,6 @@ function checkDeprecations( silent: boolean, dir: string ) { - warnOptionHasBeenDeprecated( - userConfig, - 'publicRuntimeConfig', - `Runtime config is deprecated and the \`publicRuntimeConfig\` configuration option will be removed in Next.js 16.`, - silent - ) - warnOptionHasBeenDeprecated( - userConfig, - 'serverRuntimeConfig', - `Runtime config is deprecated and the \`serverRuntimeConfig\` configuration option will be removed in Next.js 16.`, - silent - ) - if (userConfig.experimental?.dynamicIO !== undefined) { warnOptionHasBeenDeprecated( userConfig, diff --git a/packages/next/src/server/dev/next-dev-server.ts b/packages/next/src/server/dev/next-dev-server.ts index e417dbe808fb1..901c47b2def82 100644 --- a/packages/next/src/server/dev/next-dev-server.ts +++ b/packages/next/src/server/dev/next-dev-server.ts @@ -723,12 +723,7 @@ export default class DevServer extends Server { // from waiting on them for the page to load in dev mode const __getStaticPaths = async () => { - const { - configFileName, - publicRuntimeConfig, - serverRuntimeConfig, - httpAgentOptions, - } = this.nextConfig + const { configFileName, httpAgentOptions } = this.nextConfig const { locales, defaultLocale } = this.nextConfig.i18n || {} const staticPathsWorker = this.getStaticPathsWorker() @@ -740,8 +735,6 @@ export default class DevServer extends Server { config: { pprConfig: this.nextConfig.experimental.ppr, configFileName, - publicRuntimeConfig, - serverRuntimeConfig, cacheComponents: Boolean( this.nextConfig.experimental.cacheComponents ), diff --git a/packages/next/src/server/dev/static-paths-worker.ts b/packages/next/src/server/dev/static-paths-worker.ts index 227933c08fe22..72023e2e42a70 100644 --- a/packages/next/src/server/dev/static-paths-worker.ts +++ b/packages/next/src/server/dev/static-paths-worker.ts @@ -25,8 +25,6 @@ import type { AppRouteRouteModule } from '../route-modules/app-route/module' type RuntimeConfig = { pprConfig: ExperimentalPPRConfig | undefined configFileName: string - publicRuntimeConfig: { [key: string]: any } - serverRuntimeConfig: { [key: string]: any } cacheComponents: boolean } @@ -92,9 +90,6 @@ export async function loadStaticPaths({ }) // update work memory runtime-config - ;( - require('../../shared/lib/runtime-config.external') as typeof import('../../shared/lib/runtime-config.external') - ).setConfig(config) setHttpClientAndAgentOptions({ httpAgentOptions, }) diff --git a/packages/next/src/server/lib/router-utils/router-server-context.ts b/packages/next/src/server/lib/router-utils/router-server-context.ts index 568be2acae75f..eaeafcc6eb56a 100644 --- a/packages/next/src/server/lib/router-utils/router-server-context.ts +++ b/packages/next/src/server/lib/router-utils/router-server-context.ts @@ -28,8 +28,6 @@ export type RouterServerContext = Record< parsedUrl?: UrlWithParsedQuery, setHeaders?: boolean ) => Promise - // current loaded public runtime config - publicRuntimeConfig?: NextConfigComplete['publicRuntimeConfig'] // exposing nextConfig for dev mode specifically nextConfig?: NextConfigComplete // whether running in custom server mode diff --git a/packages/next/src/server/render.tsx b/packages/next/src/server/render.tsx index 4e6fee912ffb4..a40b5ba05b078 100644 --- a/packages/next/src/server/render.tsx +++ b/packages/next/src/server/render.tsx @@ -240,7 +240,6 @@ function renderPageTree( } export type RenderOptsPartial = { - runtimeConfig?: { [key: string]: any } assetPrefix?: string err?: Error | null nextExport?: boolean @@ -1465,7 +1464,6 @@ export async function renderToHTMLImpl( domainLocales, locale, locales, - runtimeConfig, } = renderOpts const htmlProps: HtmlProps = { __NEXT_DATA__: { @@ -1474,7 +1472,6 @@ export async function renderToHTMLImpl( query, // querystring parsed / passed by the user buildId: sharedContext.buildId, assetPrefix: assetPrefix === '' ? undefined : assetPrefix, // send assetPrefix to the client side when configured, otherwise don't sent in the resulting HTML - runtimeConfig, // runtimeConfig if provided, otherwise don't sent in the resulting HTML nextExport: nextExport === true ? true : undefined, // If this is a page exported by `next export` autoExport: isAutoExport === true ? true : undefined, // If this is an auto exported page isFallback, diff --git a/packages/next/src/server/route-modules/pages/pages-handler.ts b/packages/next/src/server/route-modules/pages/pages-handler.ts index 8c9a1a80a3e7f..179d1b5773b0f 100644 --- a/packages/next/src/server/route-modules/pages/pages-handler.ts +++ b/packages/next/src/server/route-modules/pages/pages-handler.ts @@ -203,10 +203,6 @@ export const getHandler = ({ query: hasStaticProps ? {} : originalQuery, }) - const publicRuntimeConfig: Record = - routerServerContext?.publicRuntimeConfig || - nextConfig.publicRuntimeConfig - const handleResponse = async (span?: Span) => { const responseGenerator: ResponseGenerator = async ({ previousCacheEntry, @@ -274,12 +270,6 @@ export const getHandler = ({ nextConfig.experimental.disableOptimizedLoading, largePageDataBytes: nextConfig.experimental.largePageDataBytes, - // Only the `publicRuntimeConfig` key is exposed to the client side - // It'll be rendered as part of __NEXT_DATA__ on the client side - runtimeConfig: - Object.keys(publicRuntimeConfig).length > 0 - ? publicRuntimeConfig - : undefined, isExperimentalCompile, diff --git a/packages/next/src/shared/lib/runtime-config.external.ts b/packages/next/src/shared/lib/runtime-config.external.ts deleted file mode 100644 index 1a294922c94c8..0000000000000 --- a/packages/next/src/shared/lib/runtime-config.external.ts +++ /dev/null @@ -1,15 +0,0 @@ -let runtimeConfig: any - -/** - * @deprecated Runtime config is deprecated and will be removed in Next.js 16. - */ -export default () => { - return runtimeConfig -} - -/** - * @deprecated Runtime config is deprecated and will be removed in Next.js 16. - */ -export function setConfig(configValue: any): void { - runtimeConfig = configValue -} diff --git a/packages/next/src/shared/lib/utils.ts b/packages/next/src/shared/lib/utils.ts index abc5d6da627f3..7a5ff10744ae9 100644 --- a/packages/next/src/shared/lib/utils.ts +++ b/packages/next/src/shared/lib/utils.ts @@ -91,7 +91,6 @@ export type NEXT_DATA = { query: ParsedUrlQuery buildId: string assetPrefix?: string - runtimeConfig?: { [key: string]: any } nextExport?: boolean autoExport?: boolean isFallback?: boolean diff --git a/test/e2e/app-dir/deprecation-warning-runtime-config/app/layout.tsx b/test/e2e/app-dir/deprecation-warning-runtime-config/app/layout.tsx deleted file mode 100644 index 888614deda3ba..0000000000000 --- a/test/e2e/app-dir/deprecation-warning-runtime-config/app/layout.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { ReactNode } from 'react' -export default function Root({ children }: { children: ReactNode }) { - return ( - - {children} - - ) -} diff --git a/test/e2e/app-dir/deprecation-warning-runtime-config/app/page.tsx b/test/e2e/app-dir/deprecation-warning-runtime-config/app/page.tsx deleted file mode 100644 index b11185cc1000b..0000000000000 --- a/test/e2e/app-dir/deprecation-warning-runtime-config/app/page.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import getConfig from 'next/config' - -export default function Page() { - getConfig() - return

hello world

-} diff --git a/test/e2e/app-dir/deprecation-warning-runtime-config/deprecation-warning-runtime-config.test.ts b/test/e2e/app-dir/deprecation-warning-runtime-config/deprecation-warning-runtime-config.test.ts deleted file mode 100644 index 19c3bbfd403ce..0000000000000 --- a/test/e2e/app-dir/deprecation-warning-runtime-config/deprecation-warning-runtime-config.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { nextTestSetup } from 'e2e-utils' - -describe('deprecation-warning-runtime-config', () => { - const { next } = nextTestSetup({ - files: __dirname, - }) - - it('should warn when imported "next/config" module', async () => { - // Navigate to "/" for dev server to execute the code - await next.browser('/') - - expect(next.cliOutput).toContain( - 'Runtime config is deprecated and will be removed in Next.js 16. Please remove the usage of "next/config" from your project.' - ) - }) -}) diff --git a/test/e2e/app-dir/deprecation-warning-runtime-config/next.config.js b/test/e2e/app-dir/deprecation-warning-runtime-config/next.config.js deleted file mode 100644 index 789b3b853ebed..0000000000000 --- a/test/e2e/app-dir/deprecation-warning-runtime-config/next.config.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @type {import('next').NextConfig} - */ -const nextConfig = { - publicRuntimeConfig: { - foo: 'bar', - }, - serverRuntimeConfig: { - foo: 'bar', - }, -} - -module.exports = nextConfig diff --git a/test/e2e/deprecation-warnings/deprecation-warnings.test.ts b/test/e2e/deprecation-warnings/deprecation-warnings.test.ts index 941b9a48b83fc..3be6fa6e0bb2f 100644 --- a/test/e2e/deprecation-warnings/deprecation-warnings.test.ts +++ b/test/e2e/deprecation-warnings/deprecation-warnings.test.ts @@ -32,14 +32,6 @@ describe('deprecation-warnings', () => { // Should warn about experimental.instrumentationHook expect(logs).toContain('experimental.instrumentationHook') expect(logs).toContain('no longer needed') - - // Should warn about publicRuntimeConfig - expect(logs).toContain('publicRuntimeConfig') - expect(logs).toContain('will be removed in Next.js 16') - - // Should warn about serverRuntimeConfig - expect(logs).toContain('serverRuntimeConfig') - expect(logs).toContain('will be removed in Next.js 16') }) }) }) diff --git a/test/e2e/deprecation-warnings/fixtures/with-deprecated-config/next.config.js b/test/e2e/deprecation-warnings/fixtures/with-deprecated-config/next.config.js index e966bf4e380ca..2c51b2cba480c 100644 --- a/test/e2e/deprecation-warnings/fixtures/with-deprecated-config/next.config.js +++ b/test/e2e/deprecation-warnings/fixtures/with-deprecated-config/next.config.js @@ -4,10 +4,4 @@ module.exports = { experimental: { instrumentationHook: true, }, - publicRuntimeConfig: { - foo: 'bar', - }, - serverRuntimeConfig: { - foo: 'bar', - }, } diff --git a/test/integration/config-mjs/next.config.mjs b/test/integration/config-mjs/next.config.mjs index 84b5831fc866e..a26eb8fbda653 100644 --- a/test/integration/config-mjs/next.config.mjs +++ b/test/integration/config-mjs/next.config.mjs @@ -4,12 +4,6 @@ export default { maxInactiveAge: 1000 * 60 * 60, }, poweredByHeader: false, - serverRuntimeConfig: { - mySecret: 'secret', - }, - publicRuntimeConfig: { - staticFolder: '/static', - }, env: { customVar: 'hello', }, diff --git a/test/integration/config-mjs/pages/next-config.js b/test/integration/config-mjs/pages/next-config.js index 945aeba52da33..da615fabbe425 100644 --- a/test/integration/config-mjs/pages/next-config.js +++ b/test/integration/config-mjs/pages/next-config.js @@ -1,10 +1,5 @@ -import getConfig from 'next/config' -const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() - export default () => (
-

server-only: {serverRuntimeConfig.mySecret || '***'}

-

{publicRuntimeConfig.staticFolder}

{process.env.customVar}

) diff --git a/test/integration/config-mjs/test/index.test.ts b/test/integration/config-mjs/test/index.test.ts index 16a13738f99f9..5d66d3f2c4427 100644 --- a/test/integration/config-mjs/test/index.test.ts +++ b/test/integration/config-mjs/test/index.test.ts @@ -44,32 +44,16 @@ describe('Configuration', () => { expect(header).not.toBe('Next.js') }) - test('renders server config on the server only', async () => { - const $ = await get$('/next-config') - expect($('#server-only').text()).toBe('server-only: secret') - }) - - test('renders public config on the server only', async () => { - const $ = await get$('/next-config') - expect($('#server-and-client').text()).toBe('/static') - }) - test('correctly imports a package that defines `module` but no `main` in package.json', async () => { const $ = await get$('/module-only-content') expect($('#messageInAPackage').text()).toBe('OK') }) - it('should have config available on the client', async () => { + it('should have env variables available on the client', async () => { const browser = await webdriver(context.appPort, '/next-config') - const serverText = await browser.elementByCss('#server-only').text() - const serverClientText = await browser - .elementByCss('#server-and-client') - .text() const envValue = await browser.elementByCss('#env').text() - expect(serverText).toBe('server-only: ***') - expect(serverClientText).toBe('/static') expect(envValue).toBe('hello') await browser.close() }) diff --git a/test/integration/config/next.config.js b/test/integration/config/next.config.js index e71caf99a7fed..b0e5313875383 100644 --- a/test/integration/config/next.config.js +++ b/test/integration/config/next.config.js @@ -4,12 +4,6 @@ module.exports = { maxInactiveAge: 1000 * 60 * 60, }, poweredByHeader: false, - serverRuntimeConfig: { - mySecret: 'secret', - }, - publicRuntimeConfig: { - staticFolder: '/static', - }, env: { customVar: 'hello', }, diff --git a/test/integration/config/pages/next-config.js b/test/integration/config/pages/next-config.js index 945aeba52da33..da615fabbe425 100644 --- a/test/integration/config/pages/next-config.js +++ b/test/integration/config/pages/next-config.js @@ -1,10 +1,5 @@ -import getConfig from 'next/config' -const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() - export default () => (
-

server-only: {serverRuntimeConfig.mySecret || '***'}

-

{publicRuntimeConfig.staticFolder}

{process.env.customVar}

) diff --git a/test/integration/config/test/index.test.js b/test/integration/config/test/index.test.js index 2bad399016e62..a178283dc0f9e 100644 --- a/test/integration/config/test/index.test.js +++ b/test/integration/config/test/index.test.js @@ -44,32 +44,16 @@ describe('Configuration', () => { expect(header).not.toBe('Next.js') }) - test('renders server config on the server only', async () => { - const $ = await get$('/next-config') - expect($('#server-only').text()).toBe('server-only: secret') - }) - - test('renders public config on the server only', async () => { - const $ = await get$('/next-config') - expect($('#server-and-client').text()).toBe('/static') - }) - test('correctly imports a package that defines `module` but no `main` in package.json', async () => { const $ = await get$('/module-only-content') expect($('#messageInAPackage').text()).toBe('OK') }) - it('should have config available on the client', async () => { + it('should have env variables available on the client', async () => { const browser = await webdriver(context.appPort, '/next-config') - const serverText = await browser.elementByCss('#server-only').text() - const serverClientText = await browser - .elementByCss('#server-and-client') - .text() const envValue = await browser.elementByCss('#env').text() - expect(serverText).toBe('server-only: ***') - expect(serverClientText).toBe('/static') expect(envValue).toBe('hello') await browser.close() }) diff --git a/test/integration/development-runtime-config/components/Layout.js b/test/integration/development-runtime-config/components/Layout.js deleted file mode 100644 index 75cc04d8d65dd..0000000000000 --- a/test/integration/development-runtime-config/components/Layout.js +++ /dev/null @@ -1,15 +0,0 @@ -import getConfig from 'next/config' - -const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() - -const Layout = ({ children }) => { - return ( -
-

{JSON.stringify(serverRuntimeConfig)}

-

{JSON.stringify(publicRuntimeConfig)}

-
{children}
-
- ) -} - -export default Layout diff --git a/test/integration/development-runtime-config/pages/_app.js b/test/integration/development-runtime-config/pages/_app.js deleted file mode 100644 index f76402f3025c8..0000000000000 --- a/test/integration/development-runtime-config/pages/_app.js +++ /dev/null @@ -1,11 +0,0 @@ -import Layout from './../components/Layout' - -const App = ({ Component, pageProps }) => { - return ( - - - - ) -} - -export default App diff --git a/test/integration/development-runtime-config/pages/index.js b/test/integration/development-runtime-config/pages/index.js deleted file mode 100644 index f40492ac06d85..0000000000000 --- a/test/integration/development-runtime-config/pages/index.js +++ /dev/null @@ -1 +0,0 @@ -export default () => 'test' diff --git a/test/integration/development-runtime-config/pages/post/[pid].js b/test/integration/development-runtime-config/pages/post/[pid].js deleted file mode 100644 index d5aa21f76fe99..0000000000000 --- a/test/integration/development-runtime-config/pages/post/[pid].js +++ /dev/null @@ -1,22 +0,0 @@ -const Post = () => { - return ( -
-

POST

-
- ) -} - -export const getStaticProps = async () => { - return { - props: {}, - } -} - -export const getStaticPaths = async () => { - return { - paths: ['/post/1', '/post/2'], - fallback: true, - } -} - -export default Post diff --git a/test/integration/development-runtime-config/test/index.test.js b/test/integration/development-runtime-config/test/index.test.js deleted file mode 100644 index 12245e02d9d04..0000000000000 --- a/test/integration/development-runtime-config/test/index.test.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs-extra' -import { join } from 'path' -import cheerio from 'cheerio' -import { - findPort, - renderViaHTTP, - launchApp, - waitFor, - killApp, -} from 'next-test-utils' - -const appDir = join(__dirname, '../') -const nextConfig = join(appDir, 'next.config.js') - -const runApp = async (config) => { - const port = await findPort() - - let stderr = '' - const app = await launchApp(appDir, port, { - onStderr(err) { - stderr += err - }, - }) - - const html = await renderViaHTTP(port, '/post/1') - const $ = cheerio.load(html) - await waitFor(1000) - - await killApp(app) - await fs.remove(nextConfig) - - expect(stderr).not.toMatch( - /Cannot read property 'serverRuntimeConfig' of undefined/i - ) - expect(JSON.parse($('#server-runtime-config').text())).toEqual( - config.serverRuntimeConfig || {} - ) - expect(JSON.parse($('#public-runtime-config').text())).toEqual( - config.publicRuntimeConfig || {} - ) -} - -describe('should work with runtime-config in next.config.js', () => { - test('empty runtime-config', async () => { - await fs.writeFile( - nextConfig, - ` - module.exports = { - } - ` - ) - - await runApp({}) - }) - - test('with runtime-config', async () => { - const config = { - serverRuntimeConfig: { - mySecret: '**********', - }, - publicRuntimeConfig: { - staticFolder: '/static', - }, - } - - await fs.writeFile( - nextConfig, - ` - module.exports = ${JSON.stringify(config)} - ` - ) - - await runApp(config) - }) -}) diff --git a/test/production/export/index.test.ts b/test/production/export/index.test.ts index 336de74d77114..7c649137f423a 100644 --- a/test/production/export/index.test.ts +++ b/test/production/export/index.test.ts @@ -185,7 +185,7 @@ describe('static export', () => { .elementByCss('#about-page p') .text() - expect(text).toBe('This is the About page foo') + expect(text).toBe('This is the About page') await browser.close() }) @@ -198,7 +198,7 @@ describe('static export', () => { .elementByCss('#about-page p') .text() - expect(text).toBe('This is the About page foo') + expect(text).toBe('This is the About page') await browser.close() }) @@ -396,7 +396,7 @@ describe('static export', () => { it('should render the about page', async () => { const html = await renderViaHTTP(port, '/about') - expect(html).toMatch(/This is the About page foobar/) + expect(html).toMatch(/This is the About page/) }) it('should render links correctly', async () => { @@ -456,7 +456,7 @@ describe('static export', () => { it('Should serve public files', async () => { const html = await renderViaHTTP(port, '/about') const data = await renderViaHTTP(port, '/about/data.txt') - expect(html).toMatch(/This is the About page foobar/) + expect(html).toMatch(/This is the About page/) expect(data).toBe('data') }) diff --git a/test/production/export/next.config.js b/test/production/export/next.config.js index 65a64af92c9c8..ae6fca6d47902 100644 --- a/test/production/export/next.config.js +++ b/test/production/export/next.config.js @@ -2,12 +2,6 @@ module.exports = (phase) => { return { output: 'export', distDir: 'out', - publicRuntimeConfig: { - foo: 'foo', - }, - serverRuntimeConfig: { - bar: 'bar', - }, trailingSlash: true, exportPathMap: function () { return { diff --git a/test/production/export/pages/about.js b/test/production/export/pages/about.js index 409d9407ca92d..4db3d07cdaa51 100644 --- a/test/production/export/pages/about.js +++ b/test/production/export/pages/about.js @@ -1,18 +1,12 @@ import Link from 'next/link' -import getConfig from 'next/config' -const { publicRuntimeConfig, serverRuntimeConfig } = getConfig() -const About = ({ bar }) => ( +const About = () => (
Go Back
-

{`This is the About page ${publicRuntimeConfig.foo}${bar || ''}`}

+

This is the About page

) -About.getInitialProps = async (ctx) => { - return { bar: serverRuntimeConfig.bar } -} - export default About diff --git a/test/production/next-server-nft/next-server-nft.test.ts b/test/production/next-server-nft/next-server-nft.test.ts index eadd738031588..1c98f5e5f76b1 100644 --- a/test/production/next-server-nft/next-server-nft.test.ts +++ b/test/production/next-server-nft/next-server-nft.test.ts @@ -294,7 +294,6 @@ const isReact18 = parseInt(process.env.NEXT_TEST_REACT_VERSION) === 18 "/node_modules/next/dist/shared/lib/is-plain-object.js", "/node_modules/next/dist/shared/lib/is-thenable.js", "/node_modules/next/dist/shared/lib/no-fallback-error.external.js", - "/node_modules/next/dist/shared/lib/runtime-config.external.js", "/node_modules/next/dist/shared/lib/server-reference-info.js", "/node_modules/react/cjs/react.production.js", "/node_modules/react/index.js", diff --git a/test/production/pages-dir/production/fixture/pages/runtime-config.js b/test/production/pages-dir/production/fixture/pages/runtime-config.js deleted file mode 100644 index dae6b687bc254..0000000000000 --- a/test/production/pages-dir/production/fixture/pages/runtime-config.js +++ /dev/null @@ -1,16 +0,0 @@ -import getConfig from 'next/config' - -const page = () => { - const { publicRuntimeConfig, serverRuntimeConfig } = getConfig() - - return ( - <> - {publicRuntimeConfig &&

found public config

} - {serverRuntimeConfig &&

found server config

} - - ) -} - -page.getInitialProps = () => ({}) - -export default page diff --git a/test/production/pages-dir/production/test/index.test.ts b/test/production/pages-dir/production/test/index.test.ts index 3880888c925a5..e61da9616a1d3 100644 --- a/test/production/pages-dir/production/test/index.test.ts +++ b/test/production/pages-dir/production/test/index.test.ts @@ -936,19 +936,6 @@ describe('Production Usage', () => { }) } - it('should have default runtime values when not defined', async () => { - const html = await renderViaHTTP(next.appPort, '/runtime-config') - expect(html).toMatch(/found public config/) - expect(html).toMatch(/found server config/) - }) - - it('should not have runtimeConfig in __NEXT_DATA__', async () => { - const html = await renderViaHTTP(next.appPort, '/runtime-config') - const $ = cheerio.load(html) - const script = $('#__NEXT_DATA__').html() - expect(script).not.toMatch(/runtimeConfig/) - }) - it('should add autoExport for auto pre-rendered pages', async () => { for (const page of ['/about']) { const html = await renderViaHTTP(next.appPort, page) diff --git a/test/production/typescript-basic/typechecking/index.ts b/test/production/typescript-basic/typechecking/index.ts index d3c796aaef2dd..d318cbdac8c9e 100644 --- a/test/production/typescript-basic/typechecking/index.ts +++ b/test/production/typescript-basic/typechecking/index.ts @@ -3,7 +3,6 @@ import 'next/app' // import 'next/babel'; import 'next/cache' import 'next/client' -import 'next/config' import 'next/constants' import 'next/document' import 'next/dynamic' diff --git a/test/rspack-build-tests-manifest.json b/test/rspack-build-tests-manifest.json index 364f5b1e05eb8..c0a7fb25c5dab 100644 --- a/test/rspack-build-tests-manifest.json +++ b/test/rspack-build-tests-manifest.json @@ -12277,16 +12277,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/development-runtime-config/test/index.test.js": { - "passed": [ - "should work with runtime-config in next.config.js empty runtime-config", - "should work with runtime-config in next.config.js with runtime-config" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/disable-js/test/index.test.js": { "passed": [ "disabled runtime JS production mode should not have __NEXT_DATA__ script", @@ -20857,7 +20847,6 @@ "Production Usage Misc should handle already finished responses", "Production Usage Misc should have default runtime values when not defined", "Production Usage Misc should not add autoExport for non pre-rendered pages", - "Production Usage Misc should not have runtimeConfig in __NEXT_DATA__", "Production Usage Misc should reload the page on page script error", "Production Usage Misc should reload the page on page script error with prefetch", "Production Usage Runtime errors should call getInitialProps on _error page during a client side component error", diff --git a/test/rspack-dev-tests-manifest.json b/test/rspack-dev-tests-manifest.json index 7fc37f94f7b7a..a3dbb9d36a888 100644 --- a/test/rspack-dev-tests-manifest.json +++ b/test/rspack-dev-tests-manifest.json @@ -14100,16 +14100,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/development-runtime-config/test/index.test.js": { - "passed": [ - "should work with runtime-config in next.config.js empty runtime-config", - "should work with runtime-config in next.config.js with runtime-config" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/disable-js/test/index.test.js": { "passed": [ "disabled runtime JS development mode should have a script for each preload link", diff --git a/test/turbopack-build-tests-manifest.json b/test/turbopack-build-tests-manifest.json index dc51c7f133d15..2d0f6ad28dfa1 100644 --- a/test/turbopack-build-tests-manifest.json +++ b/test/turbopack-build-tests-manifest.json @@ -10844,16 +10844,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/development-runtime-config/test/index.test.js": { - "passed": [ - "should work with runtime-config in next.config.js empty runtime-config", - "should work with runtime-config in next.config.js with runtime-config" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/disable-js/test/index.test.js": { "passed": [ "disabled runtime JS production mode should not have __NEXT_DATA__ script", @@ -19236,7 +19226,6 @@ "Production Usage Misc should handle already finished responses", "Production Usage Misc should have default runtime values when not defined", "Production Usage Misc should not add autoExport for non pre-rendered pages", - "Production Usage Misc should not have runtimeConfig in __NEXT_DATA__", "Production Usage Misc should reload the page on page script error", "Production Usage Misc should reload the page on page script error with prefetch", "Production Usage Runtime errors should call getInitialProps on _error page during a client side component error", diff --git a/test/turbopack-dev-tests-manifest.json b/test/turbopack-dev-tests-manifest.json index 30a34481987e8..1acad1033dc01 100644 --- a/test/turbopack-dev-tests-manifest.json +++ b/test/turbopack-dev-tests-manifest.json @@ -14369,16 +14369,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/development-runtime-config/test/index.test.js": { - "passed": [ - "should work with runtime-config in next.config.js empty runtime-config", - "should work with runtime-config in next.config.js with runtime-config" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/disable-js/test/index.test.js": { "passed": [ "disabled runtime JS development mode should have a script for each preload link", diff --git a/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/webpack-wrapper-strs-namespaces-large/input.js b/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/webpack-wrapper-strs-namespaces-large/input.js index 0d681fce0f9cc..f21dac75733cb 100644 --- a/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/webpack-wrapper-strs-namespaces-large/input.js +++ b/turbopack/crates/turbopack-tracing/tests/node-file-trace/test/unit/webpack-wrapper-strs-namespaces-large/input.js @@ -2735,7 +2735,6 @@ module.exports = /******/ (function (modules) { const { processEnv } = __webpack_require__('4VNc') processEnv([]) - const runtimeConfig = {} const { parse } = __webpack_require__('bzos') const { parse: parseQs } = __webpack_require__('8xkj') const { renderToHTML } = __webpack_require__('KK5V') @@ -2822,7 +2821,6 @@ module.exports = /******/ (function (modules) { canonicalBase: '', buildId: 'xXPgpxsbhoEyVP2leRiec', assetPrefix: '', - runtimeConfig: runtimeConfig.publicRuntimeConfig || {}, previewProps: { previewModeId: '9e0f19a11fe1be22878bdb16da136d9e', previewModeSigningKey: