-
Notifications
You must be signed in to change notification settings - Fork 69
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
Feature request: configure swc's target
property
#141
Comments
Related: #138 I think the problem is to be solved at the core level. I need to investigate but I might push it in the next major coming in September. The reason I used In the meantime I think using a one line patch is the best solution (using pnpm or patch-package) It's enabled on TS to allow to disable esbuild completely, otherwise esbuild will run on SWC output for TSX. It's also expected for people using plugins. |
Thank you for the explanation. A patch via pnpm is exactly what we're doing in the meantime. |
Hi,
during developement this plugin currently applies
target: "es2020"
to swc's JscTarget with no way to change the language level.In our case this results in JavaScript's private fields being transpiled into
WeakMap
s, even though all major browser support this feature by now (this makes debugging classes using private fields very unpleasant).It would help a lot if the plugin would support a
target
option, e.g.Alternatively, the default target could simply be raised.
Just out of curiosity, why does the plugin's transform hook run on "plain"
.ts
files (no JSX)?Thanks!
The text was updated successfully, but these errors were encountered: