Skip to content
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

React 18: Separate concurrentFeatures and runtime options #31317

Closed
7 tasks done
devknoll opened this issue Nov 11, 2021 · 3 comments · Fixed by #35245
Closed
7 tasks done

React 18: Separate concurrentFeatures and runtime options #31317

devknoll opened this issue Nov 11, 2021 · 3 comments · Fixed by #35245
Assignees

Comments

@devknoll
Copy link
Contributor

devknoll commented Nov 11, 2021

  • Add the global experimental runtime flag to switch the default runtime. If runtime is set, we enable Fizz for all pages. It works similar to the concurrentFeatures flag. If runtime is missing, Fizz will not be enabled.
    • Add support for nodejs runtime. (@shuding)
  • Remove concurrentFeatures from the config but keep it internal. It will be disabled for now.
  • Add per-page runtime flag to enable Fizz for specific pages. The global runtime will now not affect all pages.
    • Pre-parse each page before any compilation happens to collect page configurations. (@huozhi)
    • Generate entries for each compilers based on page and global runtimes. (@shuding)
  • Allow the global runtime to be unset. (@shuding)
@jlarmstrongiv
Copy link
Contributor

Separating the concurrent and runtime features would be great, as it’s trivial to hit the 1MB limit of the vercel edge runtime #32907 and break your app

@wvanrensselaer
Copy link

wvanrensselaer commented Feb 17, 2022

Heyo, this is an awesome feature, thanks. Just want to flag this here since we are experimenting with Relay + SSR Suspense: #32502 (comment)

@shuding shuding mentioned this issue Mar 3, 2022
10 tasks
kodiakhq bot pushed a commit that referenced this issue Mar 8, 2022
Partially implements #31317 and #31506. There're also some trade-offs made with this PR: since we can't know if a certain runtime will be used or not beforehand, we have to start both runtime compilers (Node.js and Edge) and then generate entrypoints correspondingly.

Note that with this PR, the global runtime is still required to use the per-page runtime.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
kodiakhq bot pushed a commit that referenced this issue Mar 11, 2022
Previously we only run `PagesManifestPlugin` in the Node server runtime, because the Edge target doesn't need it as the web server and middleware SSR loader specially handled pages manifest. This cases entrypoints with the Edge runtime configured being missing from there and this PR fixes it.

Part of #31317 and #31506.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
@kodiakhq kodiakhq bot closed this as completed in #35245 Mar 16, 2022
kodiakhq bot pushed a commit that referenced this issue Mar 16, 2022
…35245)

This PR depends on #35242 and #35243. It allows the global runtime to be unset, as well as enables static optimization for Fizz and RSC pages in the Node.js runtime. Currently for the Edge runtime pages are still always SSR'd.

Closes #31317.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`


Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants