Repository navigation
Fix adapter i18n App route handling - #97500
timneutkens wants to merge 1 commit into
Conversation
Failing test suitesCommit: 9561de0 | About building and testing Next.js
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● lazy-dynamic-imports › does not parse a dynamic import target before activation
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● adapter config with i18n routes › keeps dynamic Pages API routes in the canonical namespace ● adapter config with i18n routes › keeps dynamic App routes in the literal namespace
Expand output● i18n-app-pages-domain-routing › routes an explicit locale pathname to a dynamic App page
Expand output● i18n-app-pages-domain-routing › routes an explicit locale pathname to a dynamic App page
Expand output● adapter config with i18n routes › keeps dynamic Pages API routes in the canonical namespace ● adapter config with i18n routes › keeps dynamic App routes in the literal namespace
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● i18n-app-pages-domain-routing › keeps Pages Router domain locale handling ● i18n-app-pages-domain-routing › routes a proxy locale rewrite to a dynamic App page
Expand output● adapter config with i18n routes › keeps dynamic Pages API routes in the canonical namespace ● adapter config with i18n routes › keeps dynamic App routes in the literal namespace |
Stats from current PR🔴 1 regression, 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (25 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsDiff too large to display app-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsDiff too large to display app-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsDiff too large to display app-page.runtime.prod.jsDiff too large to display app-route-ex..ntime.dev.jsDiff too large to display app-route-ex..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route.runtime.dev.jsDiff too large to display app-route.ru..time.prod.jsDiff too large to display pages-api-tu..ntime.dev.jsDiff too large to display pages-api-tu..time.prod.jsDiff too large to display pages-api.runtime.dev.jsDiff too large to display pages-api.ru..time.prod.jsDiff too large to display pages-turbo...ntime.dev.jsDiff too large to display pages-turbo...time.prod.jsDiff too large to display pages.runtime.dev.jsDiff too large to display pages.runtime.prod.jsDiff too large to display server.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: db85d87 |
a0240d9 to
2cd2f35
Compare
3afcbdb to
71f4fac
Compare
80b454d to
db85d87
Compare
db85d87 to
d5379c2
Compare
d5379c2 to
6cb8ca1
Compare
## Summary Fix hybrid App Router and Pages Router projects using Pages i18n so explicit or rewritten locale segments remain available to App Router route matching, while Pages routes continue using locale-normalized paths. The built-in filesystem matcher now carries each route owner through `RouteKind`, avoids duplicate App routes being treated as Pages routes in production, and preserves literal App path parameters through the router server, direct route-module invocation, and static export paths. The same ownership information is maintained by the development bundler. Adds regression coverage for domain locales, proxy rewrites, exact and dynamic App pages, catch-all parameters, route handlers, inferred default locales, and Pages routes. Adapter-generated routing metadata is intentionally handled in the follow-up layers #97366 and #97500. Closes #86048 ## Verification - `pnpm build-all` - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/e2e/app-dir/i18n-app-pages-domain-routing/i18n-app-pages-domain-routing.test.ts` (9 passed) - Prettier and ESLint checks on all changed files <!-- NEXT_JS_LLM -->
6cb8ca1 to
9561de0
Compare
Summary
Fix adapter-generated routing metadata for App Pages and App Routes in projects that also configure Pages i18n.
Dynamic App routes now use their literal pathname ownership instead of receiving a synthetic
nextLocaleprefix in their matcher and destination. Locale-like App prerenders are also linked to their App output before Pages locale normalization, preventing them from being associated with the wrong output.This PR is stacked on #97366, which introduces routing manifest v2 and keeps Pages API routes canonical. The built-in router/runtime behavior is isolated in #98095 so the adapter contract and ownership model can be reviewed separately.
Adds adapter assertions for App Page and App Route matchers, destinations, prerender parent linkage, and output deduplication, along with deployment-compatible coverage for the shared i18n routing fixture.
Verification
pnpm build-allNEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/production/adapter-config-i18n/adapter-config-i18n.test.ts(4 passed)