@@ -161,6 +161,26 @@ function assignDefaults(
161
161
delete userConfig . exportTrailingSlash
162
162
}
163
163
164
+ // There are a good amount of test fixtures that have amp enabled
165
+ // that also assert on stderr output being empty, so we're gating the
166
+ // warning to be skipped when running in Next.js tests until we fully
167
+ // remove the feature.
168
+ if ( ! process . env . __NEXT_TEST_MODE ) {
169
+ warnOptionHasBeenDeprecated (
170
+ userConfig ,
171
+ 'amp' ,
172
+ `Built-in amp support is deprecated and the \`amp\` configuration option will be removed in Next.js 16.` ,
173
+ silent
174
+ )
175
+
176
+ warnOptionHasBeenDeprecated (
177
+ userConfig ,
178
+ 'experimental.amp' ,
179
+ `Built-in amp support is deprecated and the \`experimental.amp\` configuration option will be removed in Next.js 16.` ,
180
+ silent
181
+ )
182
+ }
183
+
164
184
// Handle deprecation of experimental.dynamicIO and migrate to experimental.cacheComponents
165
185
if ( userConfig . experimental ?. dynamicIO !== undefined ) {
166
186
warnOptionHasBeenDeprecated (
@@ -503,26 +523,6 @@ function assignDefaults(
503
523
}
504
524
}
505
525
506
- // There are a good amount of test fixtures that have amp enabled
507
- // that also assert on stderr output being empty, so we're gating the
508
- // warning to be skipped when running in Next.js tests until we fully
509
- // remove the feature.
510
- if ( ! process . env . __NEXT_TEST_MODE ) {
511
- warnOptionHasBeenDeprecated (
512
- result ,
513
- 'amp' ,
514
- `Built-in amp support is deprecated and the \`amp\` configuration option will be removed in Next.js 16.` ,
515
- silent
516
- )
517
-
518
- warnOptionHasBeenDeprecated (
519
- result ,
520
- 'experimental.amp' ,
521
- `Built-in amp support is deprecated and the \`experimental.amp\` configuration option will be removed in Next.js 16.` ,
522
- silent
523
- )
524
- }
525
-
526
526
warnCustomizedOption (
527
527
result ,
528
528
'experimental.esmExternals' ,
0 commit comments