跳到正文
TakoAPI
返回技能列表

web-bundling

由 kjaylee 提供

Web & Frontend Development
—暂无评分
你的评分

简介

Bundle web applications into single HTML files for distribution.

描述

该技能的功能

Bundles React/Vite applications into a single self-contained HTML file. Handles inlining of CSS, JS, images, fonts, and audio as base64 data URIs. Covers both frameworkless games and React+Vite+Parcel workflows.

A single HTML file eliminates external CDN dependencies, making it work offline and simplifying distribution to platforms like itch.io or Telegram.

何时使用

  • Packaging a React game for itch.io upload
  • Sharing a prototype without a hosting server
  • Bundling a Telegram Mini App into one deployable file
  • Creating an offline-capable HTML5 demo
  • Inlining fonts and audio for a fully portable artifact

示例工作流

输入

User asks: bundle my React+Vite game into a single HTML file

智能体
  1. 1

    Run npm run build to produce the Vite dist output

  2. 2

    Run npx parcel build dist/index.html --no-source-maps to combine assets

  3. 3

    Run npx html-inline dist/index.html -o bundle.html to inline remaining assets

  4. 4

    Verify no external CDN references remain in bundle.html

  5. 5

    Check file size and confirm console errors are absent

输出

bundle.html — a single portable HTML file with all assets inlined

安装

clawhub install kjaylee/web-bundling

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接