Skip to content

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

Open
layershifter wants to merge 4 commits intomicrosoft:mainfrom
layershifter:refactor/tsc-build-executor
Open

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

Conversation

@layershifter
Copy link
Member

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

github-actions bot commented Mar 11, 2026

📊 Bundle size report

✅ No changes found

…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>
@layershifter layershifter force-pushed the refactor/tsc-build-executor branch from a5fe818 to d9cf8d7 Compare March 11, 2026 16:21
layershifter and others added 3 commits March 11, 2026 17:30
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>
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