Repository navigation
fix(config): keep Vite's default client resolve conditions - #2365
Merged
Merged
Conversation
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 detectedLatest commit: 71a4cf8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
2 tasks done
lxsmnsyc
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
solid-start:configsetsresolve.conditions: ["generic"]on every environment (#2326). Settingresolve.conditionsreplaces 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 withprocess 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."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-mappingin dev when the overlay is enabled, as was done before forsource-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.tsresolve a real Vite config withsolidStart()and check the client conditions, the server conditions, and the dev-only pre-bundling. Two of them fail without the fix.Other information
distthrough pnpmpatchedDependencies: the client resolves the"browser"build in dev and build, and the dev overlay renders client errors with their source frames."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.