feat(create-rslib): add Solid template and related documents - #1731
Merged
Conversation
Add template-solid-ts and template-solid-js with: - Dual output: compiled .js via pluginSolid + preserve .jsx with "solid" condition - Button component, CSS, and tests using @solidjs/testing-library - rstest + happy-dom test setup - TypeScript config with jsx: preserve and jsxImportSource: solid-js
- Add 'solid-js' and 'solid-ts' to TEMPLATES array - Add Solid option to interactive template selector - Add Solid-specific assertions in test helper (plugin deps, exports, peer deps) - Add CASES_SOLID test cases and parseTemplateName assertions
Add English and Chinese documentation covering: - Project creation with create-rslib - Plugin setup (pluginBabel + pluginSolid) - Dual output with "solid" export condition - TypeScript and SSR configuration
The second lib entry for source JSX output needs two settings: - `jsc.transform.react.runtime: 'preserve'` to prevent SWC from compiling JSX - `module.parser.javascript.jsx: true` to let Rspack's parser accept JSX syntax Without these, SWC defaults to React JSX transform, producing `React.createElement` calls instead of preserved JSX. Also updates EN/ZH docs to explain the dual-output configuration in detail.
Deploying rslib with
|
| Latest commit: |
c1d8dae
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://36c2b901.rslib.pages.dev |
| Branch Preview URL: | https://feat-solid-template.rslib.pages.dev |
elecmonkey
marked this pull request as ready for review
June 30, 2026 08:43
Contributor
|
Add an example later after this pr merged. |
Remove the separate `dist/source` subdirectory for the preserved JSX output. Both compiled (.js) and source (.jsx) files now coexist in `dist/`, simplifying the package structure and exports field.
Timeless0911
reviewed
Jul 7, 2026
Timeless0911
reviewed
Jul 7, 2026
Timeless0911
reviewed
Jul 7, 2026
Timeless0911
reviewed
Jul 7, 2026
Timeless0911
reviewed
Jul 7, 2026
Contributor
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # packages/create-rslib/test/helper.ts
Contributor
Resolved the merge conflict in |
Timeless0911
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a Solid template to
create-rslib.The template builds a Solid component library with dual ESM outputs:
importpoints to compiled JavaScriptsolidpoints to preserved JSX sourceThis also adds Solid guide docs.
Related Links
Checklist