Skip to content

refactor: update build config for @primer/react and rename import CSS plugin for Rolldown#8044

Open
joshblack wants to merge 7 commits into
copilot/rolldown/styled-reactfrom
copilot/rolldown/react
Open

refactor: update build config for @primer/react and rename import CSS plugin for Rolldown#8044
joshblack wants to merge 7 commits into
copilot/rolldown/styled-reactfrom
copilot/rolldown/react

Conversation

@joshblack

@joshblack joshblack commented Jun 23, 2026

Copy link
Copy Markdown
Member

Updated build tooling for @primer/react to use Rolldown, including renaming the internal CSS import plugin package to match Rolldown naming.

Changelog

New

N/A

Changed

  • Updated @primer/react to build JavaScript with Rolldown.
  • Renamed rollup-plugin-import-css to rolldown-plugin-import-css.
  • Updated the import CSS plugin package to export its TypeScript source directly for Rolldown consumption.
  • Updated the export size helper and Dependabot bundler grouping for Rolldown.

Removed

  • Removed the package Rollup build config and direct Rollup build dependencies.
  • Removed the build step and Rollup build config for rolldown-plugin-import-css.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; build tooling-only change with no public runtime API change

Testing & Reviewing

Validated with npm run build, npm run type-check, npm run lint, npm run lint:css, npm run format:diff, and npm test -- --run.

Merge checklist

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 39f1f05

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@joshblack joshblack changed the title Migrate react build to Rolldown refactor: update build config for @primer/react to rolldown Jun 23, 2026
@joshblack joshblack added the skip changeset This change does not need a changelog label Jun 23, 2026
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 6469729 to 1017094 Compare June 23, 2026 21:03
@joshblack joshblack force-pushed the copilot/rolldown/react branch from 2e609a8 to 52c006a Compare June 23, 2026 21:03
@joshblack joshblack changed the title refactor: update build config for @primer/react to rolldown refactor: update build config for @primer/react and import CSS plugin to rolldown Jun 23, 2026
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 1017094 to d5ac815 Compare June 23, 2026 21:05
@joshblack joshblack force-pushed the copilot/rolldown/react branch from 52c006a to 0505bad Compare June 23, 2026 21:05
@github-actions github-actions Bot requested a deployment to storybook-preview-8044 June 23, 2026 21:07 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from d5ac815 to df43076 Compare June 23, 2026 21:09
@joshblack joshblack force-pushed the copilot/rolldown/react branch from 0505bad to b1b47db Compare June 23, 2026 21:09
@github-actions github-actions Bot requested a deployment to storybook-preview-8044 June 23, 2026 21:13 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from df43076 to f45042c Compare June 23, 2026 21:15
@joshblack joshblack force-pushed the copilot/rolldown/react branch from b1b47db to 0faabc0 Compare June 23, 2026 21:15
@github-actions github-actions Bot requested a deployment to storybook-preview-8044 June 23, 2026 21:19 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/react branch from 0faabc0 to 9be68ba Compare June 23, 2026 21:19
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from f45042c to eda4557 Compare June 23, 2026 21:19
@github-actions github-actions Bot requested a deployment to storybook-preview-8044 June 23, 2026 21:23 Abandoned
@github-actions github-actions Bot temporarily deployed to storybook-preview-8044 June 23, 2026 21:34 Inactive
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from eda4557 to 8c7d5ad Compare June 23, 2026 21:42
@joshblack joshblack force-pushed the copilot/rolldown/react branch from 9be68ba to fc230c4 Compare June 23, 2026 21:42
@github-actions github-actions Bot temporarily deployed to storybook-preview-8044 June 23, 2026 21:53 Inactive
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 8c7d5ad to 3f5ee13 Compare June 23, 2026 21:56
@joshblack joshblack force-pushed the copilot/rolldown/react branch from fc230c4 to ef8164e Compare June 23, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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/react bundling 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.json can 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

Comment thread packages/react/script/get-export-sizes.cjs
Comment thread packages/react/script/get-export-sizes.cjs
Comment thread .github/dependabot.yml
joshblack and others added 7 commits June 24, 2026 11:01
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants