web-bundling
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.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
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.
How to use
Przygotuj projekt React z TypeScript i Vite. Uruchom
npm run build, aby wygenerować folderdist/z plikami aplikacji.Zainstaluj Parcel (jeśli jeszcze go nie masz) i spakuj wygenerowany
dist/index.htmlw jeden plik:npx parcel build dist/index.html --no-source-maps. Parcel połączy wszystkie moduły i zasoby.Użyj narzędzia html-inline, aby osadzić pozostałe zasoby bezpośrednio w HTML:
npx html-inline dist/index.html -o bundle.html. Wynik to pojedynczy plik HTML bez zależności CDN.Zoptymalizuj rozmiar: skompresuj obrazy, upewnij się, że kod jest zminifikowany, a audio (jeśli jest) osadź w base64 tylko dla małych efektów dźwiękowych.
Przetestuj plik offline i na urządzeniu mobilnym (jeśli planujesz Telegram Mini App). Sprawdź konsolę przeglądarki pod kątem błędów.
Wgraj gotowy
bundle.htmlna wybraną platformę: itch.io (bezpośredni upload), Telegram Mini App (hosting + konfiguracja bota), GitHub Pages lub inne serwisy.