Skip to content

Free Studio from Bundle dependency (#88) - #113

Draft
nounder wants to merge 1 commit into
mainfrom
cursor/fix-88-studio-no-bundle-c215
Draft

Free Studio from Bundle dependency (#88)#113
nounder wants to merge 1 commit into
mainfrom
cursor/fix-88-studio-no-bundle-c215

Conversation

@nounder

@nounder nounder commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Fixes #88

Summary

Studio required a Bundle layer just to resolve the datastar client script. It now serves a prebuilt JS artifact directly, so Studio no longer depends on Bundle.

Changes

  • Build script + checked-in DatastarClient ESM string
  • Studio /_datastar.js route (auth-protected) replaces bundle.resolve(...)
  • Drop Bundle from studio fixtures/tests
  • Staleness guard test against src/datastar/

Test plan

  • bun test test/studio/routes.test.tsx test/datastar/DatastarClient.test.ts
Open in Web Open in Cursor 

Studio's HTML wrapper resolved 'effect-start/datastar' via the generic
Bundle context, so any app mounting Studio had to also configure a
Bundle layer (esbuild/rolldown/BunBundle) just to get a working page.

Bundle src/datastar/ into src/studio/internal/DatastarClient.ts ahead
of time (scripts/build-datastar-client) and serve it from a dedicated
Studio route (/_datastar.js), protected by the same basic-auth
middleware as the rest of Studio. Studio no longer touches Bundle.Bundle
at all.

- scripts/build-datastar-client: one-time bundling step (Bun.build),
  checked into git via src/studio/internal/DatastarClient.ts
- test/datastar/DatastarClient.test.ts: guards against the generated
  file drifting from src/datastar/
- test/studio/routes.test.tsx: drops the Bundle layer from the test
  harness, adds coverage for the new /_datastar.js route
- drop the now-unnecessary BunBundle layer from the OTLP capture fixture

Co-authored-by: Ralph Gutkowski <nounder@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Free studio from Bundle

2 participants