RFC: Transitioning Config Loading from jiti to Node Native #6188
chenjiahan
started this conversation in
RFC Discussions
Replies: 1 comment
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
Currently, configuration files are loaded with jiti, which relies on Babel. This approach is relatively slow (at least ~70ms slower compared to native).
Using Node's native loader provides better performance and stricter behavior, but comes with some requirements:
package.json
must set"type": "module"
with { type: "json" }
Proposal
Short term: Introduce a new CLI option
--config-loader auto
.auto
will become the default behavior across Rstack tools.Long term: Once Node v22.18+ adoption is widespread, we plan to drop jiti.
Related
--config-loader auto
Beta Was this translation helpful? Give feedback.
All reactions