Skip to content

refactor(create-rslib): simplify framework templates - #1840

Merged
elecmonkey merged 2 commits into
mainfrom
david/refactor-create-rslib-templates
Aug 11, 2026
Merged

elecmonkey merged 2 commits into
mainfrom
david/refactor-create-rslib-templates

Conversation

@Timeless0911

@Timeless0911 Timeless0911 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Flatten single-output framework configs and hoist shared options in Solid's multi-output configs to keep generated Rslib templates concise without changing their output.
  • Use default package export fallbacks, remove the invalid Vue JS declaration entry, and enforce Solid's types → solid → default condition order in the templates and guides.
  • Remove unnecessary TypeScript handling from React JS Storybook and update the Storybook Rsbuild packages to v3.4.1, which supports Rslib configs without an explicit lib array.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI lite review requested due to automatic review settings August 11, 2026 07:26
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2170b3e
Status: ✅  Deploy successful!
Preview URL: https://10cc29c2.rslib.pages.dev
Branch Preview URL: https://david-refactor-create-rslib.rslib.pages.dev

View logs

@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: 2170b3eec0

ℹ️ 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/create-rslib/template-react-js/rslib.config.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors create-rslib’s React/Vue/Svelte/Solid templates to use a simplified Rslib configuration shape and consistent package.json#exports fallbacks (favoring default), while keeping the English/Chinese Solid solution guides aligned.

Changes:

  • Simplify template rslib.config.* files by moving repeated per-lib config (e.g. bundle: false, dts: true) to shared/top-level config where applicable.
  • Standardize template package.json export entries to use "default" fallback and adjust Solid export ordering.
  • Remove the invalid Vue JS declaration export and drop unnecessary TypeScript checking config in React JS Storybook.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/docs/zh/guide/solution/solid.mdx Align Solid docs with default export fallback and simplified config.
website/docs/en/guide/solution/solid.mdx Same as CN guide; keeps parity for Solid solution docs.
packages/create-rslib/test/helper.ts Tightens template validation around exports ordering/shape.
packages/create-rslib/template-vue-ts/rslib.config.ts Simplify Vue TS config to top-level bundle: false.
packages/create-rslib/template-vue-ts/package.json Switch Vue TS exports fallback from import to default.
packages/create-rslib/template-vue-js/rslib.config.ts Simplify Vue JS config to top-level bundle: false.
packages/create-rslib/template-vue-js/package.json Remove invalid TS declaration export for Vue JS; simplify exports.
packages/create-rslib/template-svelte-ts/rslib.config.ts Remove redundant lib.format config (defaults cover it).
packages/create-rslib/template-svelte-ts/package.json Switch Svelte TS exports fallback to default; reorder publishConfig.
packages/create-rslib/template-svelte-js/rslib.config.js Remove redundant lib.format config (defaults cover it).
packages/create-rslib/template-svelte-js/package.json Simplify exports["."] to a direct path; reorder publishConfig.
packages/create-rslib/template-storybook/react-js/.storybook/main.js Remove unnecessary TS type-checking configuration for React JS Storybook.
packages/create-rslib/template-solid-ts/rslib.config.ts Move bundle: false to shared/top-level for Solid TS template.
packages/create-rslib/template-solid-ts/package.json Fix Solid TS export condition ordering and use default fallback.
packages/create-rslib/template-solid-js/rslib.config.js Move bundle: false to shared/top-level for Solid JS template.
packages/create-rslib/template-solid-js/package.json Use default fallback for Solid JS exports; preserve solid condition.
packages/create-rslib/template-react-ts/rslib.config.ts Simplify React TS config; set top-level bundle: false and dts: true.
packages/create-rslib/template-react-ts/package.json Switch React TS exports fallback from import to default.
packages/create-rslib/template-react-js/rslib.config.js Simplify React JS config; set top-level bundle: false.
packages/create-rslib/template-react-js/package.json Simplify React JS exports to a direct path.
packages/create-rslib/template-react-compiler/react-ts/rslib.config.ts Simplify React Compiler TS template config similarly to React TS.
packages/create-rslib/template-react-compiler/react-js/rslib.config.js Simplify React Compiler JS template config similarly to React JS.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/create-rslib/test/helper.ts Outdated
@elecmonkey
elecmonkey merged commit 1f9c41f into main Aug 11, 2026
11 checks passed
@elecmonkey
elecmonkey deleted the david/refactor-create-rslib-templates branch August 11, 2026 08:58
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.

3 participants