| ▲ | blixt 12 hours ago | |
One thing I tend to do myself is use https://generator.jspm.io/ to produce an import map once for all base dependencies I need (there's also a CLI), then I can easily copy/paste this template and get a self-contained single-file app that still supports JSX, React, and everything else. Some people may think it's overkill, but for me it's much more productive than document.getElementById("...") everywhere. I don't have a lot of public examples of this, but here's a larger project where I used this strategy for a relatively large app that has TypeScript annotations for easy VSCode use, Tailwind for design, and it even loads in huge libraries like the Monaco code editor etc, and it all just works quite well 100% statically: HTML file: https://github.com/blixt/go-gittyup/blob/main/static/index.h... Main entrypoint file: https://github.com/blixt/go-gittyup/blob/main/static/main.js | ||
| ▲ | singpolyma3 8 hours ago | parent [-] | |
I wondered how you got JSX but it seems you don't quite and the true magic here is the htm library. | ||