What is Nostr?
IngwiePhoenix / Ingwie Phoenix
npub1tce…jmky
2025-02-23 13:03:24

IngwiePhoenix on Nostr: #asknostr #devstr I know Rollup can "bundle" HTML pages that link scripts. But how do ...

#asknostr #devstr I know Rollup can "bundle" HTML pages that link scripts. But how do I:
- Make it create a dist/ folder,
- Copy the HTML over,
- Rebuild the script tags to use type=text/javascript instead of =module (I have devices that ARE this old xD),
- Transpile the linked JS down into an ES5 IIFE so it stays selfcontained,
- Write that result to the dist/ folder?
I just want this to be my shell, use go:embed to put the whole dist/ folder into my app and do everything else using templ? I really just need the bundling and transpiling aspect to "make a shell". o.o
Got ideas? ^^

(The bundle will contain htmx, alpinejs and perhaps an extension or two as well as my CSS of choice.)
Author Public Key
npub1tcekjparmkju6k83r5tzmzjvjwy0nnajlrwyk35us9g7x7wx80ys9hjmky