-
-
Notifications
You must be signed in to change notification settings - Fork 53
feat!: config loader default to 'auto'
#1240
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a new 'auto'
option for the --config-loader
CLI parameter and changes the default from 'jiti'
to 'auto'
. The auto mode attempts to use Node.js's native loader first and falls back to jiti if it fails.
- Add
'auto'
as a new config loader option that tries native loader first, then falls back to jiti - Change the default config loader from
'jiti'
to'auto'
- Update documentation to reflect the new options and provide guidance on Node.js native loader limitations
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/core/src/config.ts | Add 'auto' to ConfigLoader type definition |
packages/core/src/cli/commands.ts | Update CLI option description and change default to 'auto' |
website/docs/en/guide/basic/cli.mdx | Update English CLI documentation to include 'auto' option |
website/docs/zh/guide/basic/cli.mdx | Update Chinese CLI documentation to include 'auto' option |
website/docs/en/guide/basic/configure-rslib.mdx | Update English configuration guide with new loader options and limitations |
website/docs/zh/guide/basic/configure-rslib.mdx | Update Chinese configuration guide with new loader options and limitations |
tests/integration/cli/build/rslib.config.auto.mts | Add test configuration file for auto loader functionality |
tests/integration/cli/build/path.json | Add JSON file for test configuration |
tests/integration/cli/build/build.test.ts | Add test case for auto loader fallback behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Wei <[email protected]>
Co-authored-by: Wei <[email protected]>
Summary
Add
'auto'
for--config-loader
cli options to use Node.js's native loader to load configuration files first, and fallback to using jiti if it fails.Breaking change:
The default value changes from
jiti
tonative
.More details, see RFC web-infra-dev/rsbuild#6188
Related Links
--config-loader auto
rsbuild#6186--config-loader
option #1225Checklist