Skip to content

docs(patterns): add bunFullstack: true to fullstack dev server examples - #881

Open
bealexaraujo wants to merge 2 commits into
elysiajs:mainfrom
bealexaraujo:main
Open

bealexaraujo wants to merge 2 commits into
elysiajs:mainfrom
bealexaraujo:main

Conversation

@bealexaraujo

@bealexaraujo bealexaraujo commented Oct 2, 2026 •

Copy link
Copy Markdown

The Fullstack Dev Server guide is missing bunFullstack: true from the
staticPlugin() examples, which causes JSX/TSX files to be served as
plain text instead of being compiled. Developers following the guide get:

Uncaught SyntaxError: Unexpected token '<'

This is because bunFullstack defaults to false in @elysia/static
(confirmed in src/index.ts), so Bun's bundler is never activated unless
explicitly enabled.

This PR:

  • Adds bunFullstack: true to the initial setup example
  • Adds bunFullstack: true to the custom prefix path example
  • Updates the tip to explain that both await AND bunFullstack: true
    are required — and what happens if bunFullstack is omitted

Fixes: #859

Summary by CodeRabbit

  • Documentation
    • Updated the full-stack development server guide with setup instructions for hot module replacement and HTML entry-point compilation, including JSX/TSX files.
    • Clarified that JSX/TSX files are served as plain text when full-stack mode is not enabled.
    • Updated the custom-prefix example to include full-stack mode.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 201dac1c-f6dc-4bc7-81ed-e496bf600348

📥 Commits

Reviewing files that changed from the base of the PR and between f685737 and d190422.

📒 Files selected for processing (1)
  • docs/patterns/fullstack-dev-server.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


Walkthrough

The fullstack dev server guide now explains when to use await and bunFullstack: true. Both the main setup and custom-prefix example include the option.

Changes

Fullstack dev server documentation

Layer / File(s) Summary
Update fullstack setup examples
docs/patterns/fullstack-dev-server.md
The guide explains that await sets up HMR hooks and bunFullstack: true enables compilation of HTML entry points, including JSX/TSX. Both examples set bunFullstack: true; the custom-prefix example retains prefix: '/'.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to d1904

The updated examples match the supported fullstack setup, and no merge-blocking issue is established.

Architecture Summary

Architecture risk: 🔵 Low · up to d1904

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/patterns/fullstack-dev-server.md: The setup adds bunFullstack: true to the awaited staticPlugin call. The tip now identifies two requirements: await for HMR hooks and bunFullstack: true to compile HTML entry points, including JSX/TSX; without the latter, .tsx files are served as plain text.
  • observed — Modified behavior in docs/patterns/fullstack-dev-server.md: The custom-prefix example adds bunFullstack: true to the staticPlugin options while keeping prefix: '/'.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation change: adding bunFullstack: true to the Fullstack Dev Server examples.
Linked Issues check ✅ Passed The PR addresses the coding-related documentation requirement in issue #859. In docs/patterns/fullstack-dev-server.md, the initial setup and custom-prefix examples use `await staticPlugin({ bunFulls…
Out of Scope Changes check ✅ Passed The changes remain within issue #859 scope. They update only the Fullstack Dev Server guide and its related examples and guidance. The changes provide the requested configuration and explanation. No u…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Await the hooks, let pages take flight~
bunFullstack compiles JSX right~
HTML and TSX join the show~
The prefix stays just where it should go~
A clearer guide, all neat and bright ♡

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

The bun full stack dev server docs seem to be out of date or missing some info.

1 participant