Skip to content

feat: add production error boundaries to generated Start entries - #315

Merged
birkskyum merged 1 commit into
solidjs:nextfrom
birkskyum:production-error-boundary
Aug 19, 2026
Merged

feat: add production error boundaries to generated Start entries#315
birkskyum merged 1 commit into
solidjs:nextfrom
birkskyum:production-error-boundary

Conversation

@birkskyum

Copy link
Copy Markdown
Member

Summary

  • wrap generated production app and document trees in generic error boundaries
  • return status 500 for uncaught SSR render errors and show a generic client fallback
  • add start.errorBoundary: false for applications whose middleware owns error handling
  • leave development and authored entries unchanged

This ports the production fallback behavior from SolidStart v2 PR #2091.

Validation

  • pnpm build
  • node examples/turnkey/test/run.mjs prod (53/53)
  • node examples/turnkey/test/run.mjs middleware (55/55)

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c12a04c

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

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/vite-plugin@315

commit: c12a04c

@birkskyum
birkskyum merged commit 7c10d3b into solidjs:next Aug 19, 2026
6 checks passed
ryansolid added a commit that referenced this pull request Aug 19, 2026
…'s stated use case — opting a node_modules dependency's graph into dev SSR CSS collection — could not work under the raw createFilter composition, twice over: the default /node_modules/ exclude was applied whenever the user set no exclude and createFilter's exclude-wins rule vetoed the included package, and a non-empty include turned the filter into a strict allowlist that rejected the app's own sources, pruning the crawl at the entry roots — an include-only config silently stripped ALL dev SSR CSS (live-repro'd in examples/start-ssr: include /some-ui-lib/ lost App.css from the streamed head while the page still rendered). The crawl walks the graph from the app's entries, so allowlist semantics are structurally wrong for this option; include now RESCUES files on top of the baseline (everything except exclude, which still defaults to /node_modules/ and still gets replaced — not extended — by a user exclude), composed from two createFilters so a file matching both patterns stays excluded, exactly createFilter's own conflict rule. Default and exclude-only behavior are byte-identical to before; empty-array includes are treated as absent (createFilter would read them as allow-all). Coverage the exclude side always had, now mirrored for include: the css-filter mode grew from 2 to 9 assertions across four dev-server sub-runs (exclude / include / conflict / default) against a temp node_modules package written by the harness — a real directory, not a symlink or file: dep, which Vite would realpath outside node_modules and dodge the default exclusion under test — whose JS imports its own CSS (the filter sees JS modules; CSS files bypass it), ssr.noExternal'd so the SSR env can transform the CSS import. Docs that both next.31 start options were missing: README options.start now documents css.filter (include/exclude semantics, dev-only scope) and #315's errorBoundary (generic 500 fallback, no leaked details, dev untouched, errorBoundary: false when middleware owns errors), and the option list gains the absent setup/errorBoundary/css entries; the StartOptions JSDoc for css.filter spells the same semantics. No new changeset — nothing has shipped (#316's changeset is queued unreleased in #313), so the existing start-css-filter changeset's wording is corrected to describe the fixed semantics instead. Full local gate green: start-ssr 349/349 + http-bridge 10/10, css-matrix 82/82 + bridge 19/19, build + tsc clean.

Co-authored-by: Cursor <cursoragent@cursor.com>
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