single-file-bundling
Configure Vite with vite-plugin-singlefile for mandatory single-file HTML bundling of MCP Apps. All assets (JS, CSS, images, fonts) must be inlined into a single HTML file for sandboxed iframe compatibility.
npx skills add a5c-ai/babysitter --skill single-file-bundling --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# single-file-bundling Configure Vite with vite-plugin-singlefile to produce a single self-contained HTML file for MCP Apps running in sandboxed iframes. ## Overview MCP Apps run in sandboxed iframes with no same-origin server. This means: - **No relative asset URLs** -- `<script src="./main.js">` will not resolve - **No CSS file imports** -- `<link href="./styles.css">` will not load - **No image/font paths** -- relative paths to assets will fail - The **entire UI must be a single HTML file** with all JS, CSS, images, and fonts inlined `vite-plugin-singlefile` handles this by inlining all assets into one HTML file during the Vite build. This is **mandatory** for MCP Apps -- without it, the app will show a blank iframe. ## Capabilities ### Vite Configuration - Configure Vite with `vite-plugin-singlefile` - Set correct `base`, `build.outDir`, and entry point - Handle framework-specific Vite plugins (React, Vue, Svelte, Preact, Solid) ### Single HTML File Output - All JavaScript inlined as `<script>` tags - All CSS inlined as `<style>` tags - All images converted to data URIs - All fonts converted to base64 ### Two-Phase Build Setup - Phase 1: Vite bundles UI into `dist/mcp-app.html`
- Overview
- Capabilities
- Vite Configuration
- Single HTML File Output
- Two-Phase Build Setup
- Hybrid Build Pipelines
- Usage
- Basic Vite Configuration
- React Vite Configuration
- Vue Vite Configuration
- Svelte Vite Configuration
- HTML Entry Point
- Package.json Build Scripts
- Server Reading the Bundled HTML
Required dev dependencies npm install -D vite vite-plugin-singlefile Framework-specific (pick one) npm install -D @vitejs/plugin-react # React npm install -D @vitejs/plugin-vue # Vue npm install -D @sveltejs/vite-plugin-svelte # Svelte
What does the single-file-bundling skill do?
Configure Vite with vite-plugin-singlefile for mandatory single-file HTML bundling of MCP Apps. All assets (JS, CSS, images, fonts) must be inlined into a single HTML file for sandboxed iframe compatibility.
How do I install it?
Run `npx skills add a5c-ai/babysitter --skill single-file-bundling --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From a5c-ai/babysitter, a repository with 1,642 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
