Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with <script> tags #8

Open
alexkrolick opened this issue Aug 30, 2017 · 1 comment
Open

Usage with <script> tags #8

alexkrolick opened this issue Aug 30, 2017 · 1 comment

Comments

@alexkrolick
Copy link

alexkrolick commented Aug 30, 2017

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.

@dionjwa
Copy link

dionjwa commented Jun 24, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants