refactor: update build config for @primer/styled-react to rolldown#8043
refactor: update build config for @primer/styled-react to rolldown#8043joshblack wants to merge 3 commits into
Conversation
|
2598b0d to
a5e067c
Compare
6469729 to
1017094
Compare
|
a5e067c to
fa4e757
Compare
1017094 to
d5ac815
Compare
fa4e757 to
2b55b7e
Compare
d5ac815 to
df43076
Compare
2b55b7e to
d34560d
Compare
df43076 to
f45042c
Compare
f45042c to
eda4557
Compare
d34560d to
3c87865
Compare
3c87865 to
263a167
Compare
eda4557 to
8c7d5ad
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
263a167 to
52051d7
Compare
8c7d5ad to
3f5ee13
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
3f5ee13 to
794df1b
Compare
a6f870a to
d0d3e65
Compare
794df1b to
7a8cdbb
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the @primer/styled-react package build pipeline to use Rolldown for JavaScript bundling while continuing to emit TypeScript declaration files via tsc, removing the older Rollup-based setup.
Changes:
- Switch
packages/styled-reactbuild script from Rollup torolldown. - Update the build config to use Rolldown-compatible plugins/config shape.
- Remove Rollup build dependencies and add the
rolldowndependency (with corresponding lockfile updates).
Show a summary per file
| File | Description |
|---|---|
| packages/styled-react/script/build | Updates the package build script to run rolldown before tsc and the components manifest generator. |
| packages/styled-react/rolldown.config.js | Migrates the bundler config to Rolldown and updates plugin wiring for Babel + directive preservation. |
| packages/styled-react/package.json | Removes Rollup-related devDependencies and adds rolldown. |
| package-lock.json | Reflects dependency graph changes from the Rollup → Rolldown migration. |
Copilot's findings
Comments suppressed due to low confidence (2)
packages/styled-react/rolldown.config.js:2
RolldownMagicStringis typically provided by@rolldown/pluginutilsrather than the mainrolldownentrypoint. Importing it fromrolldownrisks a runtime config-load failure if that re-export isn’t present in the installed version.
packages/styled-react/rolldown.config.js:102- This hook mutates
code(prepends the directive) but now always returnsmap: null. That drops sourcemap information compared to the previous implementation and can break debugging/stack traces when sourcemaps are enabled.
- Files reviewed: 3/4 changed files
- Comments generated: 0
Closes #
N/A
Changelog
New
N/A
Changed
@primer/styled-reactto build JavaScript with Rolldown and emit declarations with TypeScript.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