Skip to content

Bundle proto-rpc#3337

Merged
mondoreale merged 2 commits intobundlesfrom
bundle-proto-rpc
Jan 7, 2026
Merged

Bundle proto-rpc#3337
mondoreale merged 2 commits intobundlesfrom
bundle-proto-rpc

Conversation

@mondoreale
Copy link
Copy Markdown
Contributor

This pull request updates the build and packaging pipeline for the proto-rpc package to improve module output, type bundling, and cleanup. The changes introduce Rollup for bundling, refine the output structure, and add supporting scripts and dependencies.

Build and packaging improvements:

  • Added a new rollup.config.mts configuration file to bundle both CommonJS (exports.cjs) and ES module (exports.js) outputs, as well as generate bundled type definitions (exports.d.ts).
  • Updated package.json to point main to ./dist/src/exports.cjs, add a module entry for ESM, and restrict the published files to only the bundled outputs.
  • Added a postbuild script to run Rollup after TypeScript compilation, and a reset-self script to clean up build artifacts before building.

Dependency updates:

  • Added build-related devDependencies: rollup, rollup-plugin-dts, @rollup/plugin-node-resolve, tsx, and rimraf for improved bundling and cleanup.

TypeScript configuration:

  • Updated tsconfig.json to use module: preserve and moduleResolution: bundler to better support the new bundling workflow.

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 introduces a bundling pipeline for the proto-rpc package using Rollup to generate optimized CommonJS and ES module outputs with bundled type definitions. The changes modernize the build process and improve the package's distribution structure.

Key changes:

  • Implemented Rollup-based bundling with both CJS and ESM outputs
  • Updated TypeScript configuration to use module: preserve and moduleResolution: bundler for better bundler support
  • Added cleanup and build orchestration scripts with rimraf and tsx

Reviewed changes

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

File Description
packages/proto-rpc/rollup.config.mts New Rollup configuration defining build outputs for both JavaScript formats and type definitions
packages/proto-rpc/package.json Updated entry points, build scripts, and dependencies to support the new bundling workflow
packages/proto-rpc/tsconfig.json Modified TypeScript module settings to align with bundler-based resolution
package-lock.json Dependency lockfile updates for new rollup-related packages and rimraf

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

Comment thread packages/proto-rpc/package.json Outdated
Comment thread packages/proto-rpc/package.json
@mondoreale mondoreale merged commit c057fe9 into bundles Jan 7, 2026
21 checks passed
@mondoreale mondoreale deleted the bundle-proto-rpc branch January 7, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants