Skip to content

Fix vanilla-extract noExternal error - #1737

Open
williamlark wants to merge 3 commits into
masterfrom
ve-noexternal-fix
Open

williamlark wants to merge 3 commits into
masterfrom
ve-noexternal-fix

Conversation

@williamlark

@williamlark williamlark commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Our setNoExternalPlugin would silently leave packages external that use a different version of @vanilla-extract/css. Apps shouldn't have multiple versions, but not externalizing packages based on that should still not happen.

For example, previously:

app ──► braid-design-system ──► @vanilla-extract/css 1.21   (recorded first)
 └────► some-chart-lib ───────► @vanilla-extract/css 1.20   (throws, left external)

Here some-chart-lib is left external, so Node loads it from node_modules at runtime without sku's Vanilla Extract processing and with its own module instances. That can fail at import, or render different markup or class names on the server than on the client, which shows up as hydration errors.

I was able to test this in an app by creating a locally linked package that has a pinned dep to an older @vanilla-extract/css. Importing it into the app fails with "Styles were unable to be assigned to file" errors, and it resolved when updating to a snapshot release of this brach.

@williamlark
williamlark requested a review from a team as a code owner October 1, 2026 05:30
@changeset-bot

changeset-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d9f7be6

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

This PR includes changesets to release 1 package
Name Type
sku Patch

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

@williamlark williamlark changed the title fix ve noExternal error Fix vanilla-extract noExternal error Oct 1, 2026

This branch has not been deployed

No deployments
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