Skip to content

refactor(build): switch to @nx/js:tsc executor#801

Merged
layershifter merged 5 commits intomicrosoft:mainfrom
layershifter:refactor/tsc-build-executor
Apr 7, 2026
Merged

refactor(build): switch to @nx/js:tsc executor#801
layershifter merged 5 commits intomicrosoft:mainfrom
layershifter:refactor/tsc-build-executor

Conversation

@layershifter
Copy link
Copy Markdown
Member

@layershifter layershifter commented Mar 11, 2026

Summary

  • Switch @griffel/transform, @griffel/transform-shaker, and @griffel/webpack-plugin from @nx/vite:build to @nx/js:tsc executor
  • Uses TypeScript compiler directly instead of Rollup bundling — simpler build, individual output files matching source structure
  • Delete vite.config.ts (combined build+test config), create standalone vitest.config.mts (test-only)

Key details

  • tsconfig.lib.json uses module: "ESNext" + moduleResolution: "bundler" to work with @nx/js:tsc dependency path remapping
  • Package exports use "default" condition (universal) instead of "node" (which isn't matched by bundler resolution)
  • Explicit main/types fields in package.json to work around @nx/js:tsc incorrect .mts.d.mts extension mapping

Test plan

  • All three packages build successfully: npx nx run-many -t build -p transform transform-shaker webpack-plugin
  • Tests pass (119 total): npx nx run-many -t test -p transform transform-shaker webpack-plugin
  • Type-check passes: npx nx run-many -t type-check -p transform transform-shaker webpack-plugin
  • Dist structure verified — correct file extensions and export paths
  • CI passes

🤖 Generated with Claude Code

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

github-actions Bot commented Mar 11, 2026

📊 Bundle size report

✅ No changes found

@layershifter layershifter force-pushed the refactor/tsc-build-executor branch from a5fe818 to d9cf8d7 Compare March 11, 2026 16:21
layershifter and others added 4 commits April 7, 2026 11:24
…o @nx/js:tsc

Replace @nx/vite:build with @nx/js:tsc executor for these three packages.
This uses the TypeScript compiler directly instead of bundling via Rollup,
producing individual output files matching the source structure.

- Update project.json build targets to use @nx/js:tsc
- Update package.json exports to use "default" condition (compatible with bundler resolution)
- Add module: "ESNext" + moduleResolution: "bundler" to tsconfig.lib.json
- Delete vite.config.ts (was build+test), create vitest.config.mts (test-only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@layershifter layershifter force-pushed the refactor/tsc-build-executor branch from 2c708c3 to 2dcbaa2 Compare April 7, 2026 09:24
@layershifter layershifter enabled auto-merge (squash) April 7, 2026 09:42
@layershifter layershifter disabled auto-merge April 7, 2026 09:44
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@layershifter layershifter enabled auto-merge (squash) April 7, 2026 09:46
@layershifter layershifter merged commit 9774fd0 into microsoft:main Apr 7, 2026
4 checks passed
@layershifter layershifter deleted the refactor/tsc-build-executor branch April 7, 2026 10:03
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.

2 participants