Skip to content

Conversation

iamstarkov
Copy link

No description provided.

@iamstarkov iamstarkov changed the title node target fixes #1247 support node[[X].Y] as target (fixes #1247) Feb 11, 2025
@iamstarkov
Copy link
Author

iamstarkov commented Feb 12, 2025

Note that webpack runtime code is not the same as the user code you write, you should transpile those code with transpilers like Babel if you want to target specific environments, e.g, you have arrow functions in source code and want to run the bundled code in ES5 environments. Webpack won’t transpile them automatically with a targetconfigured.
https://webpack.js.org/configuration/target/#target

maybe this the reason why why nodeX.Y isnt doing transpiling

update: I realized #1247 issue is two fold: supporting node as a target and then figure out why Set polyfills are not injected when compiling node22 code to node20. and I decided to address it one by one.

@iamstarkov iamstarkov changed the title support node[[X].Y] as target (fixes #1247) fix: support node[[X].Y] as a target (fixes #1247) Feb 16, 2025
@iamstarkov iamstarkov marked this pull request as ready for review February 16, 2025 13:45
@iamstarkov iamstarkov force-pushed the fix/1247-node-target branch from 3f1bba0 to c284ed4 Compare April 8, 2025 10:18
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you add a test to confirm this works as expected?

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

Successfully merging this pull request may close these issues.

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