Skip to content

feat!: pure ESM package#40

Merged
chenjiahan merged 2 commits intomainfrom
pure_esm_0417
Apr 17, 2026
Merged

feat!: pure ESM package#40
chenjiahan merged 2 commits intomainfrom
pure_esm_0417

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

This package is now a pure ESM package.

Copilot AI review requested due to automatic review settings April 17, 2026 03:06
Copy link
Copy Markdown

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

Updates the package’s build and publishing setup to ship as a pure ESM library, simplifying the build config and aligning dependencies with the new packaging approach.

Changes:

  • Simplified rslib build config to a single (ESM) library target with DTS generation.
  • Updated package.json exports to drop CJS entrypoints and publish only the ESM output.
  • Refreshed pnpm-lock.yaml to reflect dependency changes/removals related to the new build.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
rslib.config.ts Simplifies library build configuration for ESM-only output.
package.json Updates export map to remove CJS entrypoints and publish ESM-only.
pnpm-lock.yaml Lockfile updates for dependency graph changes after build/publish adjustments.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread rslib.config.ts
@chenjiahan chenjiahan merged commit 8f6a347 into main Apr 17, 2026
8 checks passed
@chenjiahan chenjiahan deleted the pure_esm_0417 branch April 17, 2026 03:10
Copy link
Copy Markdown

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

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: ea0b39327b

ℹ️ 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 package.json
Comment on lines 12 to 16
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"default": "./dist/index.js"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore top-level "types" field for TS node resolution

Removing the root types field makes this package’s declarations undiscoverable for TypeScript projects that still use moduleResolution: "node" (or other non-NodeNext resolvers). With the current exports-only setup, those consumers now get TS2307 when importing rsbuild-plugin-rsc, even though dist/index.d.ts exists; this is a regression from the previous manifest and will break editor/type-checking in mixed or legacy configs until they migrate resolver settings.

Useful? React with 👍 / 👎.

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.

2 participants