Skip to content

Commit a7dedf8

Browse files
lxsmnsycclaude
andauthored
feat: connect the toolbar to the dev server (#48)
* feat: connect the toolbar to the dev server Add connectDevServer and the @solidjs/start-devtools/protocol entry, so @solidjs/vite-plugin can send what only the dev server knows: - errors the server runtime reports go to the Health view - open in editor uses the plugin's endpoint, one request resolved against the Vite root - the solid-js version falls back to the one the dev server resolved Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: show a server render error once, and drop the base from the protocol An <Errored> that renders its fallback on the server sends the error with the page, so hydration throws it again. The page's record and the server's now merge into one. The plugin's endpoint is mounted ahead of Vite's base handling, like Vite's own /__open-in-editor, so the info no longer carries the base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: use @solidjs/vite-plugin 3.0.0-next.57 This release serves the dev server side of the devtools protocol. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(health): keep app files in a devtools checkout out of library frames A server stack names files by absolute path. Any path under a folder named solid-start-devtools counted as library code, so the frames of the examples in this repository folded away and the viewer opened on a Vite frame. Only the checkout's dist and src folders count now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dba6dfe commit a7dedf8

21 files changed

Lines changed: 671 additions & 75 deletions

‎.changeset/dev-server-channel.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@solidjs/start-devtools': minor
3+
---
4+
5+
Add `connectDevServer`, which lets `@solidjs/vite-plugin` send the toolbar what only the dev server knows, and `@solidjs/start-devtools/protocol`, the messages and endpoints both sides use.
6+
7+
- Errors the server runtime reports during a render, a server function or a request show in the Health view.
8+
- Open in editor sends one request to the plugin's endpoint, which resolves the path against the Vite root.
9+
- The solid-js version in the header comes from the dev server when the page cannot import the package file.

‎package.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"import": "./dist/index.js"
2020
},
2121
"default": "./dist/noop.js"
22+
},
23+
"./protocol": {
24+
"types": "./dist/types/protocol.d.ts",
25+
"default": "./dist/protocol.js"
2226
}
2327
},
2428
"scripts": {
@@ -61,7 +65,7 @@
6165
"@jridgewell/trace-mapping": "^0.3.31",
6266
"@playwright/test": "^1.62.1",
6367
"@solidjs/compiler": "2.0.0-rc.20",
64-
"@solidjs/vite-plugin": "3.0.0-next.55",
68+
"@solidjs/vite-plugin": "3.0.0-next.57",
6569
"@solidjs/web": "^2.0.0-rc.20",
6670
"@twinkleplop/annotation": "^0.1.5",
6771
"@twinkleplop/theme-github": "^0.2.2",

0 commit comments

Comments
 (0)