Skip to content

chore: remove @griffel/babel-preset package#811

Draft
layershifter wants to merge 7 commits intomicrosoft:mainfrom
layershifter:chore/remove-babel-preset
Draft

chore: remove @griffel/babel-preset package#811
layershifter wants to merge 7 commits intomicrosoft:mainfrom
layershifter:chore/remove-babel-preset

Conversation

@layershifter
Copy link
Member

Summary

  • Removes the @griffel/babel-preset package entirely (~5K lines), which is no longer needed since @griffel/postcss-syntax now uses @griffel/transform directly
  • Cleans up stale references: tsconfig.base.json path, e2e nextjs pack calls, eslint-plugin type-check cwd
  • Updates @griffel/postcss-syntax README to reference @griffel/transform

Test plan

  • nx build postcss-syntax passes
  • nx test postcss-syntax passes
  • yarn install completes without errors

🤖 Generated with Claude Code

layershifter and others added 7 commits March 11, 2026 17:21
…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>
…_RSPACK branches

Switch e2e-rspack from deprecated @griffel/webpack-extraction-plugin + @griffel/webpack-loader
to the unified @griffel/webpack-plugin. Remove unnecessary IS_RSPACK conditionals in the plugin
and loader now that Rspack supports NormalModule.getCompilationHooks and namedChunks.get().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all references to @griffel/webpack-loader and
@griffel/webpack-extraction-plugin with the unified @griffel/webpack-plugin
in the ahead-of-time compilation and CSS extraction docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the package and all references from tsconfig paths, copilot
instructions, and website documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-loader

These packages are superseded by the unified @griffel/webpack-plugin.
Updates all references in e2e tests, READMEs, tsconfig paths, and
copilot instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…el/transform

Eliminate the Babel dependency chain by having postcss-syntax consume
@griffel/transform directly. This required extending transform's output
with metadata (locations, comment directives) that the Babel
location-preset previously provided.

Transform changes:
- Add SourceLocation, CommentDirective, TransformMetadata, ModuleConfig types
- Accept ModuleConfig[] in modules option for flexible import matching
- Collect call expression locations, slot locations, reset locations,
  and comment directives when generateMetadata is enabled
- Return metadata in TransformResult

postcss-syntax changes:
- Remove @babel/core, @babel/helper-plugin-utils, @griffel/babel-preset deps
- Add @griffel/transform dependency
- Delete location-preset.ts (functionality now in transform)
- Rename .ts → .mts, switch to ESM source
- Switch from Jest to Vitest
- Fix type-check cwd (was pointing to babel-preset)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The babel-preset package is no longer needed since postcss-syntax now
uses @griffel/transform directly. Also fixes eslint-plugin type-check
cwd and removes stale e2e pack references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

📊 Bundle size report

✅ No changes found

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