preact-hyperscript icon indicating copy to clipboard operation
preact-hyperscript copied to clipboard

Usage with <script> tags

Open alexkrolick opened this issue 8 years ago • 1 comments

Hi,

I'd like to add Preact-Hyperscript as a script on a CMS. I see in the Codepen you're using wzrd.in "browserify as a service" to make a UMD bundle. Do you have docs on how to do that, or would you consider adding a bundled version in dist/ for unpkg and other CDNs?

EDIT:

Since Preact is required, Browserify bundles in Preact into the build, but doesn't export it, so you need to include the package separately just for the render method. With Webpack, you could mark Preact as external and move it to peerDependencies in package.json, not sure how to do that if you prefer another bundler.

alexkrolick avatar Aug 30 '17 07:08 alexkrolick

I would also like this. Being able to create elements without complication but also using preact is advantageous. A use case: small, useful, static websites, that nevertheless require moderate UI complexity, but requiring a webpack compilation step is not possible. Preact plus hyperscript fits this nicely.

dionjwa avatar Jun 24 '19 22:06 dionjwa