Commit 311cf95
example(hubs): add public/ asset fixtures and wire the Assets dock into both hubs
The Assets tab now works end-to-end in both hub examples:
- vite-devframe-hub: already mounts the default assets devframe (manages
<cwd>/public, served by Vite at /). Added a public/ fixture set so the
tab has real content and previews resolve to Vite own URLs.
- next-devframe-hub: mount the assets devframe with its dir pointed at the
Next app public/ (src/client/public — what Next serves at /) so previews
resolve to real host URLs. Loaded via the same bundler-ignored dynamic
import as the other built-in plugins; the dir is derived with string path
ops on import.meta.url (not new URL(), which Turbopack tries to resolve as
an asset). Added the matching public/ fixtures + dep + turbo build edge,
and a dock-registration assertion in its test.
To keep the Next hub own booting test (and any short-lived host) from
leaving a background file watcher running, add a watch boolean option to
createAssetsDevframe (default true) and mount it with watch:false in the
Next hub. Vite hub keeps live-refresh on.
Co-authored-by: opencode <noreply@opencode.ai>1 parent d4a09d9 commit 311cf95
27 files changed
Lines changed: 144 additions & 3 deletions
File tree
- examples
- next-devframe-hub
- src/client
- devframe
- public
- data
- images
- styles
- tests
- vite-devframe-hub/public
- data
- images
- styles
- plugins/assets/src
- node
- tests/__snapshots__/tsnapi/@devframes/plugin-assets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
48 | 67 | | |
49 | 68 | | |
50 | 69 | | |
| |||
190 | 209 | | |
191 | 210 | | |
192 | 211 | | |
193 | | - | |
| 212 | + | |
194 | 213 | | |
195 | 214 | | |
196 | 215 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Loading
Lines changed: 10 additions & 0 deletions
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments