feat: observe option — observe build conditions + compiler componentNames - #357
Draft
ryansolid wants to merge 1 commit into
Draft
feat: observe option — observe build conditions + compiler componentNames#357ryansolid wants to merge 1 commit into
ryansolid wants to merge 1 commit into
Conversation
…ames Co-authored-by: Claude via Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 0ba22a0 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 |
commit: |
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.
Summary
New
observe: trueoption for production observability builds:observeexport condition to every environment — client and server,resolve.conditionsandresolve.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'ssolid-jsresolving the observe build while an externalized consumer'simport "solid-js"lands on Node's prod copy.componentNamesoption, so component owner labels (<Home>) survive minification in diagnosticownerPaths and attribution chains. The dev posture also getscomponentNames(alazy()or HMR wrapper otherwise hides the tag name).vite devthedevelopmentcondition still wins (solid-js nests it aboveobserve).Verified on a Sentry adapter spike: with the local plugin and compilers linked, a minified
vite buildresolves the observe runtime and reports<Router> › … › <Layout> › … › <Show> › … › <For>instead of mangled names.Gating
Depends on solidjs/solid#3340 (
componentNamesin@solidjs/compiler/@solidjs/babel-plugin). An older compiler rejects the unknown option, so before merging this PR needs@solidjs/compilerand@solidjs/babel-pluginbumped 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.