-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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: scan free dev server #8319
Merged
Merged
Conversation
This file contains 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
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
patak-dev
changed the base branch from
main
to
feat/non-blocking-esbuild-optimization-at-built-time
May 25, 2022 09:48
…ng-esbuild-optimization-at-built-time
yyx990803
reviewed
May 25, 2022
Co-authored-by: Evan You <yyx990803@gmail.com>
patak-dev
commented
May 25, 2022
Base automatically changed from
feat/non-blocking-esbuild-optimization-at-built-time
to
main
May 26, 2022 16:45
bluwy
approved these changes
May 27, 2022
Let's merge this one so we can release a new alpha with it soon. |
4 tasks
4 tasks
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.
Description
Depends on merging:
#8280 doesn't perform a scanning phase during build, and directly lets rollup process all user code first before running the optimizer. Once rollup is idle because the only pending promises are the load hooks for optimized deps, then a single optimization run is issued. So basically we scanned the whole code base with rollup and the real plugins. For the user, the only diff is that for the first run, the deps will take a bit longer than the rest, eliminating scanning from the pipeline seems like a good tradeoff.
This PR does the same during dev, since we are eagerly processing everything, it ends up being quite similar. Even the same idle detection code should work if at one point we implement
this.load({ id })
inPluginContainer
(right now I added the registering of ids on import analysis while doing the eager processing of static imports).Edit: there is an option marked as experimental to enable back the scanner during dev
optimizeDeps.devScan
.Open questions:
optimizedDeps.entries
manually configured. This would be a way to let users choose between potentially needing a full reload after and taking more time on cold start (projects like Laddle may choose the former)What is the purpose of this pull request?