refactor: update build config for @primer/doc-gen to rolldown#8041
refactor: update build config for @primer/doc-gen to rolldown#8041joshblack wants to merge 3 commits into
Conversation
|
|
7553cf9 to
f41afb4
Compare
f41afb4 to
aede53d
Compare
aede53d to
f4cf5de
Compare
f4cf5de to
82804ca
Compare
82804ca to
52d7193
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the @primer/doc-gen build pipeline by replacing the Rollup-based configuration with a Rolldown-based configuration, keeping the package’s build output (dist JS + declarations) aligned with the repo’s newer bundling tooling.
Changes:
- Removed the Rollup build config file from
@primer/doc-gen. - Added a
rolldown.config.jsthat builds ESM JavaScript and emits.d.tsviarolldown-plugin-dts. - Updated
@primer/doc-genpackage scripts and devDependencies to use Rolldown instead of Rollup+Babel.
Show a summary per file
| File | Description |
|---|---|
| packages/doc-gen/rollup.config.js | Removes the legacy Rollup build configuration. |
| packages/doc-gen/rolldown.config.js | Adds Rolldown build config for ESM output + DTS generation. |
| packages/doc-gen/package.json | Switches build/watch scripts to Rolldown and updates build-related devDependencies. |
Copilot's findings
- Files reviewed: 3/4 changed files
- Comments generated: 1
| "devDependencies": { | ||
| "@babel/core": "^7.29.0", | ||
| "@babel/plugin-transform-runtime": "^7.29.0", | ||
| "@babel/preset-env": "^7.29.0", | ||
| "@babel/preset-typescript": "^7.28.5", | ||
| "@rollup/plugin-babel": "^6.1.0", | ||
| "@rollup/plugin-commonjs": "^29.0.0", | ||
| "@rollup/plugin-json": "^6.1.0", | ||
| "@rollup/plugin-node-resolve": "^16.0.3", | ||
| "rimraf": "^6.0.1", | ||
| "rollup": "^4.59.0", | ||
| "rollup-plugin-typescript2": "^0.36.0", | ||
| "rolldown": "^1.1.2", | ||
| "rolldown-plugin-dts": "^0.26.0", | ||
| "typescript": "^6.0.3" |
There was a problem hiding this comment.
Applied: moved typescript to runtime dependencies because doc-gen imports it at runtime, and removed unused @babel/runtime now that Babel is no longer in the build pipeline.
Closes #
N/A
Changelog
New
N/A
Changed
@primer/doc-gento build JavaScript and declarations with Rolldown.Removed
Rollout strategy
Testing & Reviewing
Validated as part of the stack with
npm run build,npm run type-check,npm run lint,npm run lint:css,npm run format:diff, andnpm test -- --run.Merge checklist