Skip to content

Conversation

@ztanner
Copy link
Member

@ztanner ztanner commented Apr 3, 2025

…are (#64923)

We currently have logic spread in multiple places that normalize `nxtP`
parameters into their regular names, ie `nxtPfoo` -> `foo`. However we
don't apply this same logic to `nxtI`, which conceptually is another
parameter but for route interception. As a result, the interception
route would 404 when deployed because it'd be missing the interception
parameter.

This moves the normalization check into a util and updates the spots I
could find where we handle `nxtP` to also handle `nxtI`.

Added a new test, and validated via these deploys:

**Working**:
[Link](https://vtest314-e2e-tests-m889gxi4p-vtest314-ijjk-testing.vercel.app/)
**Non-Working**:
[Link](https://vtest314-e2e-tests-8sa5t9uau-vtest314-ijjk-testing.vercel.app/)

Fixes #62207
Closes NEXT-3204
@ijjk
Copy link
Member

ijjk commented Apr 3, 2025

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
buildDuration 16.9s 15.3s N/A
buildDurationCached 8.4s 7.4s N/A
nodeModulesSize 201 MB 201 MB ⚠️ +10.2 kB
nextStartRea..uration (ms) 389ms 388ms N/A
Client Bundles (main, webpack) Overall increase ⚠️
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
1a9f679d-HASH.js gzip 53.7 kB 53.7 kB
5428.HASH.js gzip 181 B 180 B N/A
6067-HASH.js gzip 5.14 kB 5.14 kB
6428-HASH.js gzip 31.6 kB 31.6 kB N/A
framework-HASH.js gzip 44.9 kB 44.9 kB
main-app-HASH.js gzip 242 B 243 B N/A
main-HASH.js gzip 32.3 kB 34.2 kB ⚠️ +1.83 kB
webpack-HASH.js gzip 1.68 kB 1.68 kB N/A
Overall change 136 kB 138 kB ⚠️ +1.83 kB
Legacy Client Bundles (polyfills)
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
_app-HASH.js gzip 196 B 196 B
_error-HASH.js gzip 184 B 185 B N/A
amp-HASH.js gzip 502 B 504 B N/A
css-HASH.js gzip 321 B 324 B N/A
dynamic-HASH.js gzip 1.82 kB 1.82 kB N/A
edge-ssr-HASH.js gzip 258 B 257 B N/A
head-HASH.js gzip 352 B 352 B
hooks-HASH.js gzip 371 B 372 B N/A
image-HASH.js gzip 4.32 kB 4.32 kB N/A
index-HASH.js gzip 259 B 257 B N/A
link-HASH.js gzip 2.67 kB 2.68 kB N/A
routerDirect..HASH.js gzip 316 B 314 B N/A
script-HASH.js gzip 385 B 386 B N/A
withRouter-HASH.js gzip 311 B 310 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 654 B 654 B
Client Build Manifests
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
_buildManifest.js gzip 484 B 481 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
index.html gzip 527 B 527 B
link.html gzip 542 B 540 B N/A
withRouter.html gzip 525 B 524 B N/A
Overall change 527 B 527 B
Edge SSR bundle Size
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
edge-ssr.js gzip 95.6 kB 95.6 kB N/A
page.js gzip 3.06 kB 3.07 kB N/A
Overall change 0 B 0 B
Middleware size Overall increase ⚠️
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
middleware-b..fest.js gzip 658 B 659 B N/A
middleware-r..fest.js gzip 156 B 154 B N/A
middleware.js gzip 25.5 kB 27.7 kB ⚠️ +2.18 kB
edge-runtime..pack.js gzip 839 B 839 B
Overall change 26.4 kB 28.6 kB ⚠️ +2.18 kB
Next Runtimes
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
app-page-exp...dev.js gzip 172 kB 172 kB
app-page-exp..prod.js gzip 98.4 kB 98.4 kB
app-page-tur..prod.js gzip 100 kB 100 kB
app-page-tur..prod.js gzip 94.4 kB 94.4 kB
app-page.run...dev.js gzip 146 kB 146 kB
app-page.run..prod.js gzip 92.9 kB 92.9 kB
app-route-ex...dev.js gzip 22.6 kB 22.6 kB
app-route-ex..prod.js gzip 16 kB 16 kB
app-route-tu..prod.js gzip 16 kB 16 kB
app-route-tu..prod.js gzip 15.7 kB 15.7 kB
app-route.ru...dev.js gzip 22.2 kB 22.2 kB
app-route.ru..prod.js gzip 15.7 kB 15.7 kB
pages-api-tu..prod.js gzip 9.58 kB 9.58 kB
pages-api.ru...dev.js gzip 9.85 kB 9.85 kB
pages-api.ru..prod.js gzip 9.57 kB 9.57 kB
pages-turbo...prod.js gzip 22.5 kB 22.5 kB
pages.runtim...dev.js gzip 23.2 kB 23.2 kB
pages.runtim..prod.js gzip 22.5 kB 22.5 kB
server.runti..prod.js gzip 51.8 kB 51.8 kB N/A
Overall change 909 kB 909 kB
build cache Overall increase ⚠️
vercel/next.js 14-2-1 vercel/next.js backport/64923 Change
0.pack gzip 1.63 MB 1.65 MB ⚠️ +16.1 kB
index.pack gzip 114 kB 115 kB ⚠️ +543 B
Overall change 1.74 MB 1.76 MB ⚠️ +16.7 kB
Diff details
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for main-HASH.js

Diff too large to display

Diff for server.runtime.prod.js

Diff too large to display

Commit: 2e5e706

@ijjk
Copy link
Member

ijjk commented Apr 3, 2025

Tests Passed

@ztanner ztanner marked this pull request as ready for review April 3, 2025 22:25
@ztanner ztanner requested a review from ijjk April 3, 2025 22:25
@ztanner ztanner merged commit 649ba86 into 14-2-1 Apr 4, 2025
49 of 54 checks passed
@ztanner ztanner deleted the backport/64923 branch April 4, 2025 00:35
ztanner added a commit that referenced this pull request Apr 8, 2025
The previous [backport](#77794)
caused an issue due to how imports are resolved on canary vs v14,
resulting in a message about using node.js APIs in middleware.

This moves the import to the `web` directory and adds a test case for
the warning.

Closes NDX-1014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants