Single File HTML Page - Fortune Teller Demo 🔮
Follow up on the bundleStrategy
option and the hash-based routing
from
day 19 and day 21 respectively, it is possible to create fully self-contained apps. Use the bundleStrategy: 'inline'
option and adjust Vite’s assetsInlineLimit
option.
Made the demo using Claude.ai (Sonnet 3.5). I pasted the code into svelte playground to get a basic application project quickly. Then modified the configuration to output the single HTML. I then added a simple link to test the hash based routing and a sound effect to check the inline assets.
For the project, the final HTML file, or more information you can find the source code on GitHub: