preactjs-templates / widget

Template for a widget to be embedded in another website
MIT License
88 stars 19 forks source link

Build template.html and copy into the dist/ #17

Closed NomeQ closed 2 years ago

NomeQ commented 3 years ago

It would be nice to have the template.html built without the <% preact %> tags and included in the build folder. It doesn't look like microbundle makes it easy to pass in any arguments to do so.

Even though this template is meant to be used for embeddable and reusable widgets, it's handy to have a basic static html file for demo purposes, and for checking the build output.

rschristian commented 3 years ago

The template is strictly for dev usage with Preact-CLI, which needs those tags.

If you want to prerender your widget / lib, you can use preact-render-to-string to output a string of HTML that you can then place inside your HTML file.