Skip to content

Commit 192ef57

Browse files
committed
Add warning to the import site
1 parent 89d7c0a commit 192ef57

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/next/config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
module.exports = require('./dist/shared/lib/runtime-config.external')
1+
let hasWarned = false
2+
3+
module.exports = (() => {
4+
if (!hasWarned) {
5+
console.warn(
6+
// ANSI code aligns with Next.js warning style from picocolors.
7+
' \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.'
8+
)
9+
hasWarned = true
10+
}
11+
return require('./dist/shared/lib/runtime-config.external')
12+
})()

0 commit comments

Comments
 (0)