Conversation
There was a problem hiding this comment.
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
rslibbuild config to a single (ESM) library target with DTS generation. - Updated
package.jsonexports to drop CJS entrypoints and publish only the ESM output. - Refreshed
pnpm-lock.yamlto 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.
There was a problem hiding this comment.
💡 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".
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.js", | ||
| "require": "./dist/index.cjs" | ||
| "default": "./dist/index.js" | ||
| } |
There was a problem hiding this comment.
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 👍 / 👎.
This package is now a pure ESM package.