Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Currently,
rax-compat
export esm(ES Module + ES5) outputs by default, but it imports many helper functions from@swc/helpers
and it will slow down the runtime like SSR. At this time, the node version installed in the server is 18.x or higher so it supports es2019 or higher syntax. For more detail, please see https://node.green/What this PR do?
Now
rax-compat
will exports es2021 outputs. We can consume the es2021 outouts with bundlers.For example, we can specify the
resolve.conditionName
in webpack config to import them: