Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/observe-option.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solidjs/vite-plugin': patch
---

New `observe` option: resolve Solid's observe builds for production observability. `observe: true` adds the `observe` export condition to every environment — client and server, inlined and externalized (`resolve.externalConditions`), inlining the core runtime and its consumers for server builds the way the dev posture already does so one build is loaded end to end — and turns on the compiler's `componentNames` option, so component owner labels (`<Home>`) survive minification in diagnostics and attribution paths. `componentNames` is also enabled under the dev posture, where `lazy()` and HMR wrappers otherwise hide the tag name. Requires `@solidjs/compiler` / `@solidjs/babel-plugin` ≥ 2.0.0-rc.8 (the release that adds the option).
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ This will inject `solid-js/dev` in place of `solid-js` in dev mode. Has no effec
If set to false, it won't inject it in dev.
This is useful for extra logs and debug.

#### options.observe

- Type: Boolean
- Default: false

Resolve Solid's observe builds in production: the production-speed runtime that keeps the
diagnostics and attribution channels (`OBSERVE`) alive for observability tooling (error
monitoring, performance tracing). Adds the `observe` export condition to every environment
and turns on the compiler's `componentNames` option, so component owner labels (`<Home>`)
survive minification. Under `vite dev` the dev build still wins.

#### options.hot

- Type: Boolean
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"dependencies": {
"@ampproject/remapping": "^2.3.0",
"@babel/core": "^7.23.3",
"@solidjs/babel-plugin": "^2.0.0-rc.6",
"@solidjs/compiler": "^2.0.0-rc.6",
"@solidjs/babel-plugin": "^2.0.0-rc.8",
"@solidjs/compiler": "^2.0.0-rc.8",
"@types/babel__core": "^7.20.4",
"merge-anything": "^5.1.7",
"vitefu": "^1.0.4"
Expand All @@ -75,7 +75,7 @@
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@skypack/package-check": "^0.2.2",
"@solidjs/diagnostics": "^2.0.0-rc.3",
"@solidjs/diagnostics": "2.0.0-rc.8",
"@solidjs/start-devtools": "^1.0.0-next.3",
"@types/node": "^24.0.0",
"cypress": "^14.0.0",
Expand Down
Loading
Loading