Repository navigation
refactor(create-rslib): simplify framework templates - #1840
Conversation
Deploying rslib with
|
| Latest commit: |
2170b3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://10cc29c2.rslib.pages.dev |
| Branch Preview URL: | https://david-refactor-create-rslib.rslib.pages.dev |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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.jsonexport 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.
Summary
defaultpackage export fallbacks, remove the invalid Vue JS declaration entry, and enforce Solid'stypes→solid→defaultcondition order in the templates and guides.libarray.Related Links
Checklist