Global Feed Post Login
Replying to Avatar Ingwie Phoenix (aka. birb)

#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.)

Avatar
Agnos 10mo ago

https://vite.dev/config/build-options

Can you set an older build target?

Reply to this note

Please Login to reply.

Discussion

No replies yet.