rsnext/packages/next
Joe Haddad 0d5bf65feb
Replace page loader with new route loader (#19006)
This pull request completely replaces our old page loader with a brand new route loader.

Our existing comprehensive test suite means I did not need to add a bunch of tests. I did add them where behavior was added or fixed.

Summary of the changes:

- Eagerly evaluates prefetched pages in browser idle time (speeds up transitions)
- Router is **no longer frozen** indefinitely if the Build Manifest never arrives
- Router is **no longer frozen** indefinitely if a page fails to bootstrap
- New `withFuture` utility instead of ad-hoc deduping per resource
- Prefetching is now delayed until browser idle time to not impact TTI
- Browsers without `prefetch` now fall back to eager evaluation instead of using `preload`
- We're now ready to serve non-static assets **with `no-store` without breaking prefetching**
- **Application can now hydrate without fetching CSS assets—this is a huge performance win that was previously blocking hydration**

---

The minor size increase here is unfortunate, but we have to incur it for correctness.

---

Fixes #18389
Fixes #18642
2020-11-11 18:13:16 +00:00
..
bin Correct comment on --help (#16391) 2020-08-20 13:32:55 +00:00
build Print error during next export with default image loader (#19032) 2020-11-11 15:46:48 +00:00
bundles/babel ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
cli ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
client Replace page loader with new route loader (#19006) 2020-11-11 18:13:16 +00:00
compiled Upgrade sass-loader to 10.0.5 (#18972) 2020-11-09 15:14:47 +00:00
export Print error during next export with default image loader (#19032) 2020-11-11 15:46:48 +00:00
lib Ensure basePath behavior with GS(S)P redirect (#18988) 2020-11-11 07:13:18 +00:00
next-server Replace page loader with new route loader (#19006) 2020-11-11 18:13:16 +00:00
pages Revert "Remove next-head-count (#16758)" (#18713) 2020-11-10 16:35:47 -05:00
server ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
telemetry ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
types Ensure basePath behavior with GS(S)P redirect (#18988) 2020-11-11 07:13:18 +00:00
amp.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
amp.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
app.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
app.js
babel.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
babel.js
client.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
client.js
config.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
config.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
constants.d.ts Remove default export from constants.d.ts (#8979) 2019-10-07 14:30:07 +02:00
constants.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
data.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
data.js
document.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
document.js
dynamic.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
dynamic.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
error.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
error.js
head.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
head.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
image.d.ts Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
license.md Update year on license files 2020-04-21 12:24:08 +02:00
link.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
link.js
package.json v10.0.2-canary.9 2020-11-11 11:10:21 -06:00
README.md Update README.md 2020-10-29 11:50:54 +01:00
router.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
router.js
taskfile-babel.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
taskfile-ncc.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
taskfile.js Ensure correct target is used for ncc'ing web-vitals (#18905) 2020-11-06 21:02:28 +00:00
tsconfig.json Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Authors