Unverified Commit 951af1d9 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Move experimental.runtime warning to config loading (#55880)

Ensures this warning is in line with the other warnings for removed config.
parent ba5524d0
...@@ -25,7 +25,6 @@ import { ...@@ -25,7 +25,6 @@ import {
isWebpackServerLayer, isWebpackServerLayer,
} from './utils' } from './utils'
import { CustomRoutes } from '../lib/load-custom-routes.js' import { CustomRoutes } from '../lib/load-custom-routes.js'
import { isEdgeRuntime } from '../lib/is-edge-runtime'
import { import {
CLIENT_STATIC_FILES_RUNTIME_AMP, CLIENT_STATIC_FILES_RUNTIME_AMP,
CLIENT_STATIC_FILES_RUNTIME_MAIN, CLIENT_STATIC_FILES_RUNTIME_MAIN,
...@@ -632,17 +631,6 @@ export default async function getBaseWebpackConfig( ...@@ -632,17 +631,6 @@ export default async function getBaseWebpackConfig(
? '-experimental' ? '-experimental'
: '' : ''
if (isClient) {
if (
// @ts-expect-error: experimental.runtime is deprecated
isEdgeRuntime(config.experimental.runtime)
) {
Log.warn(
'You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.'
)
}
}
const babelConfigFile = await getBabelConfigFile(dir) const babelConfigFile = await getBabelConfigFile(dir)
const distDir = path.join(dir, config.distDir) const distDir = path.join(dir, config.distDir)
......
...@@ -325,13 +325,20 @@ function assignDefaults( ...@@ -325,13 +325,20 @@ function assignDefaults(
} }
} }
// TODO: remove this in next major or minor version after 13.5 // TODO: Remove this warning in Next.js 14
warnOptionHasBeenDeprecated( warnOptionHasBeenDeprecated(
result, result,
'experimental.appDir', 'experimental.appDir',
'App router is available by default now, `experimental.appDir` option can be safely removed.', 'App router is available by default now, `experimental.appDir` option can be safely removed.',
silent silent
) )
// TODO: Remove this warning in Next.js 14
warnOptionHasBeenDeprecated(
result,
'experimental.runtime',
'You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.',
silent
)
warnOptionHasBeenMovedOutOfExperimental( warnOptionHasBeenMovedOutOfExperimental(
result, result,
'relay', 'relay',
......
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