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

feat(server): add warmupRequest api #14787

Merged
merged 3 commits into from
Nov 1, 2023
Merged

feat(server): add warmupRequest api #14787

merged 3 commits into from
Nov 1, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 28, 2023

Description

Add a warmup option to server.transformRequest to prevent internal code-duplication, and potential external uses like #14777

Also snuck adding pre-transform support for HMR soft invalidation, as the soft invalidation fast-path doesn't run through import analysis.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Oct 28, 2023
@stackblitz
Copy link

stackblitz bot commented Oct 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev
Copy link
Member

I think this is a great idea, and would enable us to push for more frameworks to have warmup strategies (with proper context).

About the API, I think it is better to have a new function warmupRequest(url) instead of overridden transformRequest with an option.

@bluwy bluwy changed the title feat(server): support transformRequest warmup option feat(server): add warmupRequest api Oct 31, 2023
@bluwy bluwy merged commit 8690581 into main Nov 1, 2023
11 checks passed
@bluwy bluwy deleted the transform-request-warmup branch November 1, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants