-
Notifications
You must be signed in to change notification settings - Fork 534
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: build import analysis plugin #2051
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
fn visit_import_expression(&mut self, it: &mut oxc::ast::ast::ImportExpression<'a>) { | ||
self.ensure_uniqueness(it.span_mut()); | ||
walk_mut::walk_import_expression(self, it); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pr will insert import('dep')
it may lead conflict if you have multiple await ()
that needs to transform.
plugin.call_transform_ast(ctx, HookTransformAstArgs { cwd: args.cwd, ast: args.ast })?; | ||
args.ast = plugin.call_transform_ast( | ||
ctx, | ||
HookTransformAstArgs { cwd: args.cwd, ast: args.ast, id: args.id }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used to filter out module
in node_modules
, https://github.com/rolldown/vite/blob/8eed5766df862049aae43a7f1611acb83363b89a/packages/vite/src/node/plugins/importAnalysisBuild.ts#L217-L219
Benchmarks Rust
|
Description