-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix scope resolution for TS enums #7057
Conversation
|
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
AtlasKit Editor 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
@@ -253,10 +253,9 @@ pub fn transform(config: Config) -> Result<TransformResult, std::io::Error> { | |||
|
|||
let global_mark = Mark::fresh(Mark::root()); | |||
let ignore_mark = Mark::fresh(Mark::root()); | |||
module = module.fold_with(&mut resolver_with_mark(global_mark)); |
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.
We just ran into this issue too. I think you can use ts_resolver
here instead, which seemed to fix our issues (but maybe I'm wrong). I believe resolver_with_mark
doesn't have any knowledge of typescript nodes.
TypeScript pass needs to be called before the resolver. This matches how SWC core does it: swc-project/swc@edc4cb4#diff-b0ba3e54b6f5ef1fa6aed8075e352a68fda66067fbafa8421042a2347801338aL251-R304