| name | web-bundling |
| description | Bundle web applications into single HTML files for distribution. Use when creating self-contained HTML games, artifacts, or demos that need to be shared as a single file. Covers React+Vite+Parcel bundling pattern. |
| metadata | {"author":"misskim","version":"1.0","origin":"Concept from Anthropic web-artifacts-builder, adapted for game distribution"} |
Web Bundling (Single HTML)
React/Vite ์ฑ์ ๋จ์ผ HTML ํ์ผ๋ก ๋ฒ๋ค๋ง.
์ธ์ ์ฌ์ฉ
- ํ
๋ ๊ทธ๋จ Mini App์ผ๋ก ๋ฐฐํฌํ ๊ฒ์
- itch.io์ ์ฌ๋ฆด HTML5 ๊ฒ์
- ๋จ์ผ ํ์ผ ๋ฐ๋ชจ/ํ๋กํ ํ์
- ํฌํธํด๋ฆฌ์ค ์ํฐํฉํธ
๋ฒ๋ค๋ง ํจํด
๊ฐ๋จํ ๊ฒ์ (ํ๋ ์์ํฌ ์์)
์ด๋ฏธ ๋จ์ผ HTML๋ก ์์ฑ๋ ๊ฒฝ์ฐ ๋ฒ๋ค๋ง ๋ถํ์.
CSS/JS๋ฅผ <style>/<script> ํ๊ทธ ์์ ์ธ๋ผ์ธ.
์ด๋ฏธ์ง๋ base64 data URI๋ก ์๋ฒ ๋.
React ์ฑ โ ๋จ์ผ HTML
์คํ: React 18 + TypeScript + Vite + Parcel (๋ฒ๋ค๋ง) + Tailwind CSS
npm run build
npx parcel build dist/index.html --no-source-maps
npx html-inline dist/index.html -o bundle.html
์์
์ธ๋ผ์ธ ํ
<img src="data:image/png;base64,iVBOR..." />
<style>
@font-face {
font-family: 'GameFont';
src: url(data:font/woff2;base64,...) format('woff2');
}
</style>
<audio src="data:audio/mp3;base64,..."></audio>
๊ฒ์ ๋ฐฐํฌ ์ฒดํฌ๋ฆฌ์คํธ
๋ฐฐํฌ ๊ฒฝ๋ก
- ํ
๋ ๊ทธ๋จ Mini App โ eastsea.monster์ ํธ์คํ
- itch.io โ HTML ํ์ผ ์ง์ ์
๋ก๋
- GitHub Pages โ ๋ ํฌ์ push
- CrazyGames/Poki โ ํ๋ซํผ ์๊ตฌ์ฌํญ ํ์ธ