feat: custom prefix for lazy compilation#10147
Merged
JSerFeng merged 5 commits intoweb-infra-dev:mainfrom Apr 25, 2025
Merged
Conversation
- Added new `prefix` option to LazyCompilationOptions to customize lazy compilation endpoint URL - Modified middleware to use the custom prefix if provided, with fallback to default prefix - Updated documentation for both English and Chinese versions - Created e2e tests to verify both custom and default prefix functionality This change allows users to customize the URL endpoint for lazy compilation, which is useful for avoiding routing conflicts or integrating with existing systems that have specific URL requirements.
✅ Deploy Preview for rspack ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
CodSpeed Performance ReportMerging #10147 will not alter performanceComparing 🎉 Hooray!
|
Contributor
|
Please don't forget to modify the config in zod as well |
JSerFeng
requested changes
Apr 24, 2025
Co-authored-by: Fy <1114550440@qq.com>
Contributor
|
LGTM, thank you ! |
JSerFeng
approved these changes
Apr 25, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds a new option to customize the URL prefix used for lazy compilation endpoints. Currently, the lazy compilation middleware uses a hardcoded
/lazy-compilation-using-prefix for its endpoints, without any way to customize it.This change adds a new
prefixoption to theLazyCompilationOptionstype, allowing users to specify a custom prefix. When this option is provided, the middleware will use the custom prefix instead of the default one. This is particularly useful for:The implementation maintains backward compatibility by using the default prefix when the custom prefix isn't specified.
Checklist