refactor: load config with shared config loader package#1
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis change adds Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e61adc00a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,4 +1,5 @@ | |||
| import { loadConfig, type RsbuildConfigDefinition } from '@rsbuild/core'; | |||
| import { loadConfig } from '@rstackjs/load-config'; | |||
There was a problem hiding this comment.
Switching loadRstackConfig() to @rstackjs/load-config changes the cache behavior unless fresh: true is passed: the new loader defaults to reusing the native module cache, while the previous Rsbuild loader always bypassed it. Because loadRstackConfig() clears state.configs after each call, any second config load in the same CLI process, such as a dev-server restart/config reload, will not re-execute the user's define.* calls and will return an empty config. Please pass fresh: true in the loadConfig options to preserve the previous behavior.
Useful? React with 👍 / 👎.
Summary
This PR switches Rstack config loading to
@rstackjs/load-configso user config resolution can use the shared Rstack loader instead of the Rsbuild loader. It adds the package to the workspace catalog, keepsjitiexternal in the CLI bundle, and updates the spelling dictionary for the new package scope.