rsnext/test/development/basic
Jiachi Liu e6ff749aee
Fix React.lazy preloading during SSR (#45160)
## Bug

Previously the `React.lazy` and Loadable preloading are creating different module loading promises with loader. Now we change to wait the loader in `React.lazy` to make sure for SSR case they're preloaded. The case to trigger this bug is: When adding `Document.getInitialProps` (aka. gIP), rendering goes to process the gIP first which would make the lazy elements executed before gIP, then preloading will happen after lazy which leads to Suspense resolves too fast without content.

Fixes #45151

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
2023-01-23 22:13:37 +00:00
..
define-class-fields feat:Add support for useDefineForClassFields typescript option (#36335) 2022-04-21 10:41:09 +02:00
emotion-swc Stabilize SWC emotion transform plugin (#37058) 2022-05-21 04:09:30 +00:00
gssp-ssr-change-reloading Fix disposing active entries in dev compilers (#39845) 2022-08-23 07:23:43 +00:00
hmr hmr error improvements (#30616) 2023-01-06 20:35:16 +01:00
legacy-decorators Add support for legacy decorators through tsconfig/jsconfig (#31376) 2021-11-13 18:26:13 +01:00
misc BREAKING CHANGE: Enable newNextLinkBehavior (#41459) 2022-10-17 21:20:28 -04:00
next-dynamic Fix dynamic no ssr with babel transform (#45091) 2023-01-23 13:39:47 -08:00
node-builtins Add support for node: prefix when importing Node.js builtin modules (#45149) 2023-01-23 14:16:35 +01:00
styled-components feat: enable styled-components css prop swc transform by default (#37962) 2022-06-23 18:08:22 +00:00
styled-components-disabled Add test for styled-components SWC transform disabled (#31214) 2021-11-09 17:18:04 +01:00
tailwind-jit Fixes #33153: Updating cross-references from master to main + canary (#33198) 2022-01-12 02:55:35 +01:00
theme-ui Add support for jsxImportSource in tsconfig/jsconfig (#31358) 2021-11-12 21:51:43 +01:00
define-class-fields.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
emotion-swc.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
hmr.test.ts Update swc_core to v0.56.0 (#44792) 2023-01-20 10:34:09 -08:00
legacy-decorators.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
misc.test.ts Migrate basic-basepath tests into basic (#44776) 2023-01-11 08:13:19 -08:00
next-dynamic.test.ts Fix React.lazy preloading during SSR (#45160) 2023-01-23 22:13:37 +00:00
node-builtins.test.ts Add support for node: prefix when importing Node.js builtin modules (#45149) 2023-01-23 14:16:35 +01:00
project-directory-rename.test.ts Add project directory rename/remove handling (#44911) 2023-01-18 14:37:40 -08:00
styled-components-disabled.test.ts Remove extra styled-components disabled test (#44870) 2023-01-13 16:26:33 -08:00
styled-components.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
tailwind-jit.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
theme-ui.test.ts Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00