Skip to content

feat: observe option — observe build conditions + compiler componentNames - #357

Draft
ryansolid wants to merge 1 commit into
nextfrom
observe-option
Draft

feat: observe option — observe build conditions + compiler componentNames#357
ryansolid wants to merge 1 commit into
nextfrom
observe-option

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Summary

New observe: true option for production observability builds:

  • Adds the observe export condition to every environment — client and server, resolve.conditions and resolve.externalConditions — and inlines the core runtime (and its consumers, via the semi-framework crawl) for server builds, the same way the dev posture does, so one build is loaded end to end rather than the app's solid-js resolving the observe build while an externalized consumer's import "solid-js" lands on Node's prod copy.
  • Turns on the compiler's componentNames option, so component owner labels (<Home>) survive minification in diagnostic ownerPaths and attribution chains. The dev posture also gets componentNames (a lazy() or HMR wrapper otherwise hides the tag name).
  • Under vite dev the development condition still wins (solid-js nests it above observe).

Verified on a Sentry adapter spike: with the local plugin and compilers linked, a minified vite build resolves the observe runtime and reports <Router> › … › <Layout> › … › <Show> › … › <For> instead of mangled names.

Gating

Depends on solidjs/solid#3340 (componentNames in @solidjs/compiler / @solidjs/babel-plugin). An older compiler rejects the unknown option, so before merging this PR needs @solidjs/compiler and @solidjs/babel-plugin bumped to the release that carries it (^2.0.0-rc.8) with the lockfile regenerated. Left unbumped here since that version isn't published yet.

Co-authored with Claude via Cursor.

…ames

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0ba22a0

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 Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 0ba22a0

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