Skip to content

fix(create-rslib): use js config for esm templates#1655

Merged
Timeless0911 merged 1 commit into
mainfrom
david/fix-js-template-config-extension
May 19, 2026
Merged

fix(create-rslib): use js config for esm templates#1655
Timeless0911 merged 1 commit into
mainfrom
david/fix-js-template-config-extension

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

Summary

This PR updates JavaScript create-rslib templates that already declare "type": "module" to use rslib.config.js instead of rslib.config.mjs, since ESM syntax is handled by the package type. It also updates the create-rslib test helper to validate the new config filename for JS React templates.

Checklist

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

Copilot AI review requested due to automatic review settings May 19, 2026 10:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 renames generated JavaScript ESM template configs from .mjs to .js where "type": "module" already enables ESM syntax.

Changes:

  • Adds rslib.config.js files for React JS, React Compiler JS, and Node JS templates.
  • Updates the React template test helper to expect rslib.config.js for JS React projects.

Reviewed changes

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

Show a summary per file
File Description
packages/create-rslib/test/helper.ts Updates JS React config filename assertion.
packages/create-rslib/template-react-js/rslib.config.js Adds React JS Rslib config using ESM syntax.
packages/create-rslib/template-react-compiler/react-js/rslib.config.js Adds React Compiler JS Rslib config.
packages/create-rslib/template-node-esm-js/rslib.config.js Adds Node ESM JS Rslib config.
packages/create-rslib/template-node-dual-js/rslib.config.js Adds Node dual-format JS Rslib config.

Comment thread packages/create-rslib/test/helper.ts
@Timeless0911 Timeless0911 enabled auto-merge (squash) May 19, 2026 11:00
@Timeless0911 Timeless0911 merged commit a6e6361 into main May 19, 2026
10 checks passed
@Timeless0911 Timeless0911 deleted the david/fix-js-template-config-extension branch May 19, 2026 11:01
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