feat: observe option — observe build conditions + compiler componentNames - #357
Conversation
🦋 Changeset detectedLatest commit: 9ab6443 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: |
…ames Co-authored-by: Claude via Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
…lers
Catalog and release-age excludes to rc.8. @solidjs/compiler and
@solidjs/babel-plugin ^2.0.0-rc.8: the observe option passes
componentNames, which older compilers reject as an unknown option.
Verified the vite-8 example (cypress) and an observe build against the
published rc.8: createComponent(Count, {}, "Count") in the bundle.
Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0ba22a0 to
af1583a
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Co-authored-by: Cursor <cursoragent@cursor.com>
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
Depended on solidjs/solid#3340 (
componentNamesin@solidjs/compiler/@solidjs/babel-plugin), released in Solid2.0.0-rc.8. The second commit rides rc.8 (catalog, release-age excludes, lockfile) and requires@solidjs/compiler/@solidjs/babel-plugin^2.0.0-rc.8, since an older compiler rejects the unknown option. Verified against the published rc.8: the vite-8 example (cypress) passes, and anobserve: truebuild of it emitscreateComponent(Count, {}, "Count")on the observe runtime. Ready for review.Co-authored with Claude via Cursor.