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
just a small note: standalone bundle of htm with preact and preact/signals #239
Comments
Hiya! I do think this would be really nice to offer, but as you mentioned it's a bit of a divergence from what the FWIW, you can grab a combined version using npm.reversehttp.com (it has a UI for getting combined bundles): <!DOCTYPE html>
<body>
<script type="module">
import {
html, h, useSignal, render
} from 'https://npm.reversehttp.com/@preact/signals-core,@preact/signals,htm/preact,preact';
function App() {
const count = useSignal(0);
return html`
<button onClick=${() => count.value++}>
${count}
</button>
`;
}
render(h(App), document.body);
</script>
</body> Here's a demo of the above on JSFiddle: |
Wow, that's interesting and can be quite useful from time to time! Thank you very much for the hint! |
First of all: thank you very much for this marvelous package!
For my personal needs, however, I "had" to bundle
htm
not only withpreact
but also withpreact/signals
- which surprisingly worked out-of-the-box.However, I won't open a pull request as this "enhancement" does not add any new functionality but just makes the import a bit more convenient...
Of course, you may close this "issue" whenever you like.
The text was updated successfully, but these errors were encountered: