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

would you be open to support node[[X].Y] as target to make GitHub Action build artifacts smaller? #1247

Open
iamstarkov opened this issue Jan 27, 2025 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@iamstarkov
Copy link

in the light of 1246 I discovered default target is es2025 and it only es* targets are expected. underlying webpack does support node* as a target, but ncc restricts it. but using es version as a target doesn't make sense for nodejs versions, because es support is fragmented.

I'd like to relax es* only target restriction to include node* as well, to make GitHub Action build artifacts smaller by not transpiling everything to es2015 but rather only to what's missing in node20 for example

@styfle styfle added the help wanted Extra attention is needed label Jan 28, 2025
@styfle
Copy link
Member

styfle commented Jan 28, 2025

The default is actually es2015.

I think adding support for target.startsWith('node') sounds like a good idea.

Its already merging with node14 here:

target: target ? ["node14", target] : "node14",

Feel free to add a PR with a test, thanks!

@iamstarkov
Copy link
Author

I'll give it a go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants