-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: Improve module transforms #16882
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58188 |
...ages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js
Show resolved
Hide resolved
...ages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js
Show resolved
Hide resolved
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.
Failure is unrelated
185e6c1
to
63f8ea8
Compare
import { template, types as t } from "@babel/core"; | ||
import type { NodePath, Visitor, Scope } from "@babel/core"; | ||
import simplifyAccess from "@babel/helper-simple-access"; |
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.
Can you remove this from package.json
?
Also (in a follow up PR) I'd like for this package to be inlined inside plugin-transform-modules-commonjs
, since now it's only used there.
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.
Sure! I would try removing it first since it introduces an extra traversal.
166dbcf
to
39fa5ee
Compare
Fixes #1, Fixes #2
The time was reduced by about 10%