Skip to content

fix(swingset): point the StyleX PostCSS plugin at the Mosaic source - #9811

Merged
alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-stylex-dependency
Sep 17, 2026
Merged

alexcarpenter merged 1 commit into
mainfrom
carp/mosaic-stylex-dependency

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Description

Since #9765 extracted Mosaic into @clerk/mosaic, production builds of Swingset render every Mosaic component unstyled (the Vercel previews show bare text). next dev is unaffected because the unplugin's runtimeInjection injects atoms and token defaults at runtime.

Swingset's @stylexjs/postcss-plugin was relying on auto-discovery to find the Mosaic source: it scans any direct dependency whose manifest lists @stylexjs/stylex under dependencies, peerDependencies, or optionalDependencies. @clerk/ui did, so packages/ui/src (Mosaic included) was scanned. @clerk/mosaic keeps StyleX in devDependencies, since tsdown inlines it into the published bundle, so the plugin skipped the package, scanned nothing, and replaced @stylex; with an empty sheet.

This gives the plugin an explicit include covering Swingset's own stories and packages/mosaic/src, so extraction no longer depends on how @clerk/mosaic declares its dependencies.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Sep 17, 2026 4:02pm UTC
swingset Ready Ready Preview Sep 17, 2026 4:02pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1767ddf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: 5ac40ade-5a21-4a81-9d53-c2188bbc0824

📥 Commits

Reviewing files that changed from the base of the PR and between 970583c and 1767ddf.

📒 Files selected for processing (2)
  • .changeset/swingset-stylex-include.md
  • packages/swingset/postcss.config.mjs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The Swingset PostCSS configuration now includes TypeScript and TSX sources from both the local src directory and the Mosaic package’s src directory for StyleX processing. An empty Changesets metadata file was added.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 1767d

The configuration covers the executable Swingset story sources; the MDX files contain documentation examples rather than omitted runtime styles. The change is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the fix to the Swingset StyleX PostCSS configuration and the Mosaic source path.
Description check ✅ Passed The description explains the production styling bug, its cause, and the explicit source inclusion fix.

Comment @coderabbitai help to get the list of available commands.

@alexcarpenter
alexcarpenter force-pushed the carp/mosaic-stylex-dependency branch from 314595f to 1767ddf Compare September 17, 2026 16:00
@alexcarpenter alexcarpenter changed the title fix(mosaic): list @stylexjs/stylex as a runtime dependency fix(swingset): point the StyleX PostCSS plugin at the Mosaic source Sep 17, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9811

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9811

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9811

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9811

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9811

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9811

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9811

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9811

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9811

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9811

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9811

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9811

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9811

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9811

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@9811

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9811

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9811

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9811

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9811

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9811

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9811

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9811

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9811

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9811

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9811

commit: 1767ddf

@alexcarpenter
alexcarpenter merged commit ed222b7 into main Sep 17, 2026
51 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-stylex-dependency branch September 17, 2026 16:28

This branch was successfully deployed

2 active deployments
Preview – swingset — 1767ddff Deployed Sep 17, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 1767ddff Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants