Bun Standalone HTML
Bundle a single-page app into a single self-contained .html file with no external dependencies
Skill by jarle
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jarle-bun-standalone-html
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bun-standalone-html
What's inside
- Skill name
Bun Standalone HTML- Description
- Bundle a single-page app into a single self-contained .html file with no external dependencies
- License
- MIT
- Instructions
- 309 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "Bun Standalone HTML" does not match folder "bun-bundler-standalone-html"
Files (1)
- SKILL.md
SKILL.md (first lines)
# Standalone HTML
> Bundle a single-page app into a single self-contained .html file with no external dependencies
Bun can bundle your entire frontend into a **single `.html` file** with zero external dependencies. JavaScript, TypeScript, JSX, CSS, images, fonts, videos, WASM — everything gets inlined into one file.
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun build --compile --target=browser ./index.html --outdir=dist
```
The output is a completely self-contained HTML document. No relative paths. No external files. No server required. Just one `.html` file that works anywhere a browser can open it.
## One file. Upload anywhere. It just works.
The output is a single `.html` file you can put anywhere:
* **Upload it to S3** or any static file host — no directory structure to maintain, just one file
* **Double-click it from your desktop** — it opens in the browser and works offline, no localhost server needed
* **Embed it in your webview** — No need to deal with relative files
* **Insert it in an `<iframe>`** — embed interactive content in another page with a single file URL
* **Serve it from anywhere** — any HTTP server, CDN, or file share. One file, zero configuration.
There's nothing to install, no `node_modules` to deploy, no build artifacts to coordinate, no relative paths to think about. The entire app — framework code, stylesheets, images, everything — lives in that one file.
## Truly one file
Normally, distributing a web page means managing a folder of assets — the HTML, the JavaScript bundles, the CSS files, the images. Move the HTML without the rest and everything breaks. Browsers have tried to solve this before: Safari's `.webarchive` and `.mhtml` are supposed to save a page as a single file, but in practice they unpack into a folder of loose files on your computer — defeating the purpose.
Standalone HTML is different. The output is a plain `.html` file. Not an archive. Not a folder. One file, with everything inside it. Every image, every font, every line of CSS and JavaScript is embedded directly in the HTML using standard `<style>` tags, `<script>` tags, and `data:` URIs. Any browser can open it. Any server can host it. Any file host can store it.
This makes it practical to distribute web pages the same way you'd distribute a PDF — as a single file you can move, copy, upload, or share without worrying about broken paths or missing assets.
## Quick start
<CodeGroup>
```html index.html icon="file-code" theme={"theme":{"light":"github-light","dark":"dracula"}}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<div id="root"></div>
<script src="./app.tsx"></script>
</body>
</html>
```
```tsx app.tsx icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import React from "react";
import { createRoot } from "react-dom/client";
function App() {
return <h1>Hello from a single HTML file!</h1>;
}
createRoot(document.getElementById("root")!).render(<App />);
```
```css styles.css icon="file-code" theme={"theme":{"light":"github-light","dark":"dracula"}}
body {
margin: 0;
font-family: system-ui, sans-serif;
background: #f5f5f5;
}
```
</CodeGroup>
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun build --compile --target=browser ./index.html --outdir=dist
```
Open `dist/index.html` — the React app works with no server.
## Everything gets inlined
Bun inlines every local asset it finds in your HTML. If it has a relative path, it gets embedded into the output file. This isn't limited to images and stylesheets — it works with any file type.
### What gets inlined
| In your source | In the output |
| ------------------------------------------------ | ------------------------------------------------------------------------ |
| `<script src="./app.tsx">` | `<script type="module">...bundled code...</script>` |
| `<link rel="stylesheet" href="./styles.css">` | `<style>...bundled CSS...</style>` |
| `<img src="./logo.png">` | `<img src="data:image/png;base64,...">` |
| `<img src="./icon.svg">` | `<img src="data:image/svg+xml;base64,...">` |
| `<video src="./demo.mp4">` | `<video src="data:video/mp4;base64,...">` |
| `<audio src="./click.wav">` | `<audio src="data:audio/wav;base64,...">` |
| `<source src="./clip.webm">` | `<source src="data:video/webm;base64,...">` |
| `<video poster="./thumb.jpg">` | `<video poster="data:image/jpeg;base64,...">` |
| `<link rel="icon" href="./favicon.ico">` | `<link rel="icon" href="data:image/x-icon;base64,...">` |
| `<link rel="manifest" href="./app.webmanifest">` | `<link rel="manifest" href="data:application/manifest+json;base64,...">` |
| CSS `url("./bg.png")` | CSS `url(data:image/png;base64,...)` |
| CSS `@import "./reset.css"` | Flattened into the `<style>` tag |
| CSS `url("./font.woff2")` | CSS `url(data:font/woff2;base64,...)` |
| JS `import "./styles.css"` | Merged into the `<style>` tag |
Images, fonts, WASM binaries, videos, audio files, SVGs — any file referenced by a relative path gets base64-encoded into a `data:` URI and embedded directly in the HTML. The MIME type is automatically detected from the file extension.
External URLs (like CDN links or absolute URLs) are left untouched.
## Using with React
React apps work out of the box. Bun handles JSX transpilation and npm package resolution automatically.
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun install react react-dom
```
<CodeGroup>
```html index.html icon="file-code" theme={"theme":{"light":"github-light","dark":"dracula"}}
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>My App</title>
<link rel="stylesheet" href="./styles.css" />
</head>From jarle/bun-skills, MIT.
More from jarle/bun-skills
- 0.459score
Bun HTML & static sites
jarle
Build static sites, landing pages, and web applications with Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Plugins
jarle
Universal plugin API for extending Bun's runtime and bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Bytecode Caching
jarle
Speed up JavaScript execution with bytecode caching in Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Buffer
jarle
Convert an ArrayBuffer to a Buffer
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Uint8Array
jarle
Convert an ArrayBuffer to a Uint8Array
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Macros
jarle
Run JavaScript functions at bundle-time with Bun macros
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Hot reloading
jarle
Hot Module Replacement (HMR) for Bun's development server
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to an array of numbers
jarle
Convert an ArrayBuffer to an array of numbers
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun esbuild
jarle
Migration guide from esbuild to Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Feedback
jarle
Share feedback, bug reports, and feature requests
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Loaders
jarle
Built-in loaders for the Bun bundler and runtime
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Blob
jarle
Convert an ArrayBuffer to a Blob
SkillDFreshness: D★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Feb 21, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jarle/bun-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jarle
- 0.559score
service-components
jarle
How to design application services with the Service Component pattern.
SkillBFreshness: B★ 3Claude Code +9 - 0.553score
service-component-testing
jarle
How to write tests for services built with Service Components.
SkillBFreshness: B★ 3Claude Code +9 - 0.459score
Bun Bytecode Caching
jarle
Speed up JavaScript execution with bytecode caching in Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun HTML & static sites
jarle
Build static sites, landing pages, and web applications with Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Plugins
jarle
Universal plugin API for extending Bun's runtime and bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Uint8Array
jarle
Convert an ArrayBuffer to a Uint8Array
SkillDFreshness: D★ 9Claude Code +9
Cite this page
Bun Standalone HTML skill. Agent Mart. https://agentmart.dev/skills/jarle-bun-standalone-html (last updated 2026-10-24)