-
-
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
perf: lazy load rollup/parseAst #15639
base: main
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Vitest uses |
@sheremet-va if Vitest uses |
|
I am fine with calling |
And it existed because it's a rollup API so it doesn't need documentation. |
I wrongly thought it was added in Vite 5, I got confused with it changing from acorn to use rollup/parseAst there. I moved the init to be awaited in |
/ecosystem-ci run vitest |
📝 Ran ecosystem CI on
|
Does importing |
This is an option too. I'll try to get some numbers after we merge #15621 and rollup is no longer statically imported. If we do this, maybe it still makes sense to remove the static |
Description
Lazy load
rollup/parseAst
, extracted from #15621The init code is delayed now until it is really needed, and this means that for some projects,
rollup/parseAst
won't be even loaded during dev.This is a breaking change, but we didn't document
this.parse
, and the exportedparseAst
function. Maybe it is ok still for Vite 5.1 given that vite ecosystem CI is happy with the change. My take is that we should only exposethis.parseAsync
andparseAstAsync
instead in Vite. I don't think we need the sync versions. cc @sheremet-vaWhat is the purpose of this pull request?