-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update redirect regexes to not match _next #27143
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRDefault Build (Decrease detected ✓)General Overall increase
|
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
buildDuration | 13s | 13s | -10ms |
buildDurationCached | 3s | 3s | -34ms |
nodeModulesSize | 49.3 MB | 49.3 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.098 | 2.158 | |
/ avg req/sec | 1191.54 | 1158.57 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.19 | 1.466 | |
/error-in-render avg req/sec | 2101.08 | 1704.93 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
359.HASH.js gzip | 3.09 kB | 3.09 kB | ✓ |
framework-HASH.js gzip | 42 kB | 42 kB | ✓ |
main-HASH.js gzip | 20.9 kB | 20.9 kB | ✓ |
webpack-HASH.js gzip | 1.49 kB | 1.49 kB | ✓ |
Overall change | 67.6 kB | 67.6 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.1 kB | 31.1 kB | ✓ |
Overall change | 31.1 kB | 31.1 kB | ✓ |
Client Pages
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
_app-HASH.js gzip | 803 B | 803 B | ✓ |
_error-HASH.js gzip | 3.18 kB | 3.18 kB | ✓ |
amp-HASH.js gzip | 526 B | 526 B | ✓ |
css-HASH.js gzip | 329 B | 329 B | ✓ |
hooks-HASH.js gzip | 903 B | 903 B | ✓ |
image-HASH.js gzip | 5.69 kB | 5.69 kB | ✓ |
index-HASH.js gzip | 261 B | 261 B | ✓ |
link-HASH.js gzip | 1.66 kB | 1.66 kB | ✓ |
routerDirect..HASH.js gzip | 319 B | 319 B | ✓ |
withRouter-HASH.js gzip | 320 B | 320 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 14.1 kB | 14.1 kB | ✓ |
Client Build Manifests
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
_buildManifest.js gzip | 419 B | 419 B | ✓ |
Overall change | 419 B | 419 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
index.html gzip | 531 B | 531 B | ✓ |
link.html gzip | 545 B | 545 B | ✓ |
withRouter.html gzip | 524 B | 524 B | ✓ |
Overall change | 1.6 kB | 1.6 kB | ✓ |
Webpack 4 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
buildDuration | 10.1s | 10.3s | |
buildDurationCached | 4.1s | 4s | -41ms |
nodeModulesSize | 49.3 MB | 49.3 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.149 | 2.171 | |
/ avg req/sec | 1163.52 | 1151.45 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.165 | 1.167 | 0 |
/error-in-render avg req/sec | 2146.17 | 2141.83 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
14.HASH.js gzip | 3.11 kB | 3.11 kB | ✓ |
677f882d2ed8..HASH.js gzip | 13.9 kB | 13.9 kB | ✓ |
framework.HASH.js gzip | 41.8 kB | 41.8 kB | ✓ |
main-HASH.js gzip | 8.17 kB | 8.17 kB | ✓ |
webpack-HASH.js gzip | 1.19 kB | 1.19 kB | ✓ |
Overall change | 68.1 kB | 68.1 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31.3 kB | 31.3 kB | ✓ |
Overall change | 31.3 kB | 31.3 kB | ✓ |
Client Pages
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
_app-HASH.js gzip | 791 B | 791 B | ✓ |
_error-HASH.js gzip | 3.83 kB | 3.83 kB | ✓ |
amp-HASH.js gzip | 531 B | 531 B | ✓ |
css-HASH.js gzip | 333 B | 333 B | ✓ |
hooks-HASH.js gzip | 910 B | 910 B | ✓ |
index-HASH.js gzip | 230 B | 230 B | ✓ |
link-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
routerDirect..HASH.js gzip | 297 B | 297 B | ✓ |
withRouter-HASH.js gzip | 293 B | 293 B | ✓ |
e025d2764813..52f.css gzip | 125 B | 125 B | ✓ |
Overall change | 8.98 kB | 8.98 kB | ✓ |
Client Build Manifests
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
_buildManifest.js gzip | 418 B | 418 B | ✓ |
Overall change | 418 B | 418 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | ijjk/next.js fix/static-next-redirect | Change | |
---|---|---|---|
index.html gzip | 574 B | 574 B | ✓ |
link.html gzip | 585 B | 585 B | ✓ |
withRouter.html gzip | 568 B | 568 B | ✓ |
Overall change | 1.73 kB | 1.73 kB | ✓ |
ijjk
requested review from
huozhi,
padmaia,
shuding,
styfle and
timneutkens
as code owners
July 13, 2021 19:30
styfle
approved these changes
Jul 13, 2021
flybayer
pushed a commit
to blitz-js/next.js
that referenced
this pull request
Aug 19, 2021
This updates redirects' regexes to not match `/_next` paths since this is currently unexpected and can easily cause a multi-match redirect to break loading client-side assets. This also fixes custom-routes not matching correctly when `trailingSlash: true/false` is used ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` x-ref: vercel#24683 x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1626159845474000)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates redirects' regexes to not match
/_next
paths since this is currently unexpected and can easily cause a multi-match redirect to break loading client-side assets. This also fixes custom-routes not matching correctly whentrailingSlash: true/false
is usedBug
fixes #number
contributing.md
x-ref: #24683
x-ref: slack thread