Skip to content

refactor: replace rollup with tsc for browser package builds#778

Closed
layershifter wants to merge 1 commit intomicrosoft:mainfrom
layershifter:chore/remove-rollup
Closed

refactor: replace rollup with tsc for browser package builds#778
layershifter wants to merge 1 commit intomicrosoft:mainfrom
layershifter:chore/remove-rollup

Conversation

@layershifter
Copy link
Member

Note

Depends on #774

Summary

  • Replace rollup with dual tsc configs (ESM + CJS) for core, react, shadow-dom, and style-types
  • Each package gets a tsconfig.lib.cjs.json that emits CJS to dist/cjs/ using module: "node16"
  • Explicit build targets in project.json run both ESM and CJS tsc builds
  • Remove @nx/rollup/plugin from nx.json

Test plan

  • nx run-many -t type-check passes
  • nx run-many -t build passes (both ESM and CJS output verified)
  • nx run-many -t test passes (including e2e-nextjs and e2e-rspack)
  • nx run-many -t lint passes

🤖 Generated with Claude Code

@layershifter layershifter requested a review from a team as a code owner March 6, 2026 13:24
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
@griffel/core
__styles (makeStyles)
1.696 kB
817 B
1.724 kB
836 B
28 B
19 B
@griffel/core
makeResetStyles (runtime)
16.524 kB
6.218 kB
16.719 kB
6.32 kB
195 B
102 B
@griffel/core
makeStyles (runtime)
25.006 kB
8.819 kB
24.954 kB
8.835 kB
-52 B
16 B
@griffel/core
mergeClasses
1.831 kB
880 B
1.859 kB
902 B
28 B
22 B
@griffel/core
shorthands.padding()
4.781 kB
1.537 kB
4.678 kB
1.52 kB
-103 B
-17 B
@griffel/react
__css
1.698 kB
797 B
1.726 kB
818 B
28 B
21 B
@griffel/react
__styles
4.307 kB
1.859 kB
4.478 kB
1.953 kB
171 B
94 B
@griffel/react
makeResetStyles (runtime)
19.179 kB
7.242 kB
19.508 kB
7.403 kB
329 B
161 B
@griffel/react
makeStaticStyles (runtime)
9.898 kB
4.286 kB
10.223 kB
4.448 kB
325 B
162 B
@griffel/react
makeStyles (runtime)
27.676 kB
9.819 kB
27.767 kB
9.89 kB
91 B
71 B
@griffel/shadow-dom
createShadowDOMRenderer
4.309 kB
1.741 kB
4.619 kB
1.927 kB
310 B
186 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
@griffel/core
__resetStyles (makeResetStyles)
273 B
197 B
🤖 This report was generated against f422dee59ffc7ad2f4e5396def5dae5c9785cf24

…for builds

Replace @nx/rollup:rollup executor with dual tsc builds (ESM + CJS) for
the four browser packages. Uses composite project references to handle
cross-package dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant