refactor: update build config for @primer/react and rename import CSS plugin for Rolldown#8044
refactor: update build config for @primer/react and rename import CSS plugin for Rolldown#8044joshblack wants to merge 7 commits into
Conversation
|
|
6469729 to
1017094
Compare
2e609a8 to
52c006a
Compare
1017094 to
d5ac815
Compare
52c006a to
0505bad
Compare
d5ac815 to
df43076
Compare
0505bad to
b1b47db
Compare
df43076 to
f45042c
Compare
b1b47db to
0faabc0
Compare
0faabc0 to
9be68ba
Compare
f45042c to
eda4557
Compare
eda4557 to
8c7d5ad
Compare
9be68ba to
fc230c4
Compare
8c7d5ad to
3f5ee13
Compare
fc230c4 to
ef8164e
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors @primer/react build tooling to use Rolldown instead of Rollup, and renames the internal CSS import plugin package to align with the Rolldown ecosystem.
Changes:
- Switch
@primer/reactbundling from Rollup to Rolldown (rolldown.config.mjs,script/build, dependency updates). - Rename and re-home the internal CSS import plugin as
rolldown-plugin-import-css, removing the old Rollup-built package. - Update CI/supporting tooling (export size script, Dependabot grouping, ESLint paths, lockfile/workspaces) for the Rolldown migration.
Show a summary per file
| File | Description |
|---|---|
| packages/rollup-plugin-import-css/rollup.config.js | Removes obsolete Rollup build config for the old CSS import plugin package. |
| packages/rollup-plugin-import-css/package.json | Removes the old Rollup plugin package manifest and build scripts/deps. |
| packages/rolldown-plugin-import-css/tsconfig.json | Adds TS config for the renamed/internal Rolldown CSS import plugin. |
| packages/rolldown-plugin-import-css/tsconfig.build.json | Adds build TS config (declarations-focused) for the new plugin package. |
| packages/rolldown-plugin-import-css/src/index.ts | Updates plugin typing import to rolldown. |
| packages/rolldown-plugin-import-css/README.md | Renames documentation references from Rollup to Rolldown. |
| packages/rolldown-plugin-import-css/package.json | Introduces new package manifest exporting TS source directly. |
| packages/react/script/get-export-sizes.cjs | Migrates export-size analysis bundling from Rollup to Rolldown. |
| packages/react/script/build | Switches bundling invocation from rollup -c to rolldown -c. |
| packages/react/rolldown.config.mjs | Updates build config to use Rolldown APIs/plugins and preserves directives. |
| packages/react/package.json | Removes Rollup deps and adds Rolldown + renamed CSS plugin dependency. |
| package.json | Updates workspace list for the renamed plugin package and removes Rollup optional dep. |
| package-lock.json | Updates lockfile for Rolldown deps and workspace rename; removes Rollup packages. |
| eslint.config.mjs | Updates ESLint file globs to target the renamed plugin package directory. |
| .github/dependabot.yml | Renames Dependabot group from rollup→rolldown and adjusts patterns. |
Copilot's findings
Comments suppressed due to low confidence (1)
packages/react/script/get-export-sizes.cjs:92
- The re-export Rolldown build also needs the JSON loader plugin so exports like
./generated/components.jsoncan be bundled/minified for size analysis.
input: '__entrypoint__',
external,
plugins: [
noopCSSModules,
virtual({
__entrypoint__: `export { ${identifier} } from '${filepath}';`,
}),
],
onwarn: () => {},
- Files reviewed: 12/15 changed files
- Comments generated: 3
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
7a8cdbb to
c7efc2e
Compare
d04df0a to
39f1f05
Compare
Updated build tooling for
@primer/reactto use Rolldown, including renaming the internal CSS import plugin package to match Rolldown naming.Changelog
New
N/A
Changed
@primer/reactto build JavaScript with Rolldown.rollup-plugin-import-csstorolldown-plugin-import-css.Removed
rolldown-plugin-import-css.Rollout strategy
Testing & Reviewing
Validated with
npm run build,npm run type-check,npm run lint,npm run lint:css,npm run format:diff, andnpm test -- --run.Merge checklist