Skip to content
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

Config options target and supported are not working #3002

Closed
georgolden opened this issue Mar 17, 2023 · 2 comments
Closed

Config options target and supported are not working #3002

georgolden opened this issue Mar 17, 2023 · 2 comments

Comments

@georgolden
Copy link

Bug:

Config: https://github.com/oldbros/shiftjs/blob/main/scripts/build.mjs

After compilation: https://github.com/oldbros/shiftjs/blob/main/dist/shift.cjs

It is clear, that both target and supported options are ignored completely during build. Code is es2015 no matter what

@evanw
Copy link
Owner

evanw commented Mar 17, 2023

I haven't investigated this yet but I'm guessing this is done for internal esbuild-specific reasons and is not related to target and supported at all (for more information see #2416 and #2889). The target and supported settings tell esbuild that it can assume a feature is supported, but that's different from forcing esbuild to not transform syntax. There is no API for forcing esbuild to not transform syntax. I would ideally like to improve the output here but that's tricky due to the current design of esbuild's class transformation code. I'm labeling this suboptimal-output because this is intentional behavior and is not a bug.

@georgolden
Copy link
Author

@evanw ok. thanks. I hope it will be refactored somewhere in the future. I like esbuild for config simplicity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants