Skip to content

feat: use auto config loader with bundled jiti - #565

Merged
chenjiahan merged 3 commits into
mainfrom
chenjiahan/feat-auto-config-loader
Oct 13, 2026
Merged

chenjiahan merged 3 commits into
mainfrom
chenjiahan/feat-auto-config-loader

Conversation

@chenjiahan

@chenjiahan chenjiahan commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Motivation

Rstack currently requires native config loading, which rejects TypeScript syntax such as enums. Allow configs to fall back to the jiti bundled with Rsbuild.

Changes

Register a lazy jiti importer and switch the shared config loader to auto. Before each jiti attempt, discard definitions from the failed native attempt in the active config session so they do not cause duplicate-definition errors. Duplicate definitions within a single attempt remain errors, and concurrent config sessions remain isolated.

Add coverage for unsupported TypeScript syntax and repeated fallback after partial definitions. Build, native build, lint/type/format checks, and the full local suite pass (427 passed, 1 skipped). The declared Node.js support range is unchanged.

Config-dependency tracking on the jiti path remains a follow-up: it currently returns no dependencies. Resetting registered definitions does not undo other side effects from config execution.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: f930d78
Status: ✅  Deploy successful!
Preview URL: https://3302b610.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-feat-auto-config.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan marked this pull request as ready for review October 13, 2026 13:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94546924b8

ℹ️ 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".

Comment thread packages/rstack/src/config.ts
Comment thread packages/rstack/src/config.ts
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T13:24:33.109271Z 0cc8e0b New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chenjiahan
chenjiahan merged commit 51102fc into main Oct 13, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/feat-auto-config-loader branch October 13, 2026 13:42
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.

1 participant