Skip to content

fix(config): keep Vite's default client resolve conditions - #2365

Merged
brenelz merged 3 commits into
solidjs:mainfrom
jchatard:fix/client-resolve-conditions
Oct 22, 2026
Merged

brenelz merged 3 commits into
solidjs:mainfrom
jchatard:fix/client-resolve-conditions

Conversation

@jchatard

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

What is the current behavior?

solid-start:config sets resolve.conditions: ["generic"] on every environment (#2326). Setting resolve.conditions replaces Vite's defaults instead of extending them, so the client environment loses "module", "browser" and "development|production": packages with a "browser" export condition (e.g. @sentry/solidstart) resolve to their Node build in the browser and crash with process is not defined.

Repro: https://github.com/jchatard/solid-start-client-conditions

What is the new behavior?

  • conditions: ["generic"] is only set on server environments, so h3 still resolves to its runtime-agnostic build there. The client keeps Vite's defaults.
  • Restoring "browser" makes @jridgewell/trace-mapping, imported unbundled by the dev overlay, load the UMD build of @jridgewell/resolve-uri, which breaks the overlay on any client error (does not provide an export named 'default'). The client environment now pre-bundles @solidjs/start > @jridgewell/trace-mapping in dev when the overlay is enabled, as was done before for source-map-js / error-stack-parser (fix: dev toolbar throwing SourceMapConsumer import error on every dev page load #2282).

Tests: three cases in packages/start/src/config/index.spec.ts resolve a real Vite config with solidStart() and check the client conditions, the server conditions, and the dev-only pre-bundling. Two of them fail without the fix.

Other information

  • Checked against the repro, using the same change applied to the 2.1.0 dist through pnpm patchedDependencies: the client resolves the "browser" build in dev and build, and the dev overlay renders client errors with their source frames.
  • Server environments still lose "module" and "development|production" along with "node". I left them as is since this PR is about the client, but this may be unintended too.

Setting resolve.conditions replaces Vite's defaults: the client lost "browser" and "module", so packages with a "browser" export condition resolved to their Node build in the browser. Only server environments get "generic" now.

With "browser" back, @jridgewell/trace-mapping, imported unbundled by the dev overlay, loads the UMD build of @jridgewell/resolve-uri: it is pre-bundled in dev.
@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 71a4cf8

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

This PR includes changesets to release 1 package
Name Type
@solidjs/start 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

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 71a4cf8
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6ada637e1198a9299b4e21b2
😎 Deploy Preview https://deploy-preview-2365--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2365

commit: 71a4cf8

@brenelz
brenelz merged commit e8bd8c0 into solidjs:main Oct 22, 2026
13 checks passed
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.

[Bug?]: 2.1.0 drops Vite's client resolve conditions, "browser" exports resolve to Node builds in the browser

3 participants