Ad/iklan :







Search.Pencarian Menu

Add text send email to rh3252705.adda@blogger.com or Click this (Text porn Will delete) | Tambah teks kirim email ke rh3252705.adda@blogger.com atau Klik ini (Teks porno akan dihapus)
Total post.pos : 13631+

[Go Make Things] Preact builder

🔥 Black Friday Sale! Today through Monday, you can join the Lean Web Club for just $9/month. Try it free for 30 days, then get 50% off for the next year.

Last year, I wrote about a mostly vanilla JavaScript way that I like to use Preact.

No JSX. No build steps. Just load a file into the browser and go!

In the article, I noted one hiccup I ran into with this approach…

While the Preact docs provide a load from CDN option as their default, the signals() method is not part of that documentation.

After some digging, I found a CDN that includes all of the methods we need. It uses ES modules, so we're going to have to add [type="module"] to our script element and import our methods.

So I was utterly delighted when reader Johan Satgé sent me an email to let me know about his project, Standalone Preact Builder.

You select the Preact stuff you want in your build, and whether you'd like to use ES modules or an IIFE. The tool spits out a file you can host locally and instructions on how to use it.

This saves you from having to hunt for a CDN that has all the things you need, and lets you run with a file that has exactly what you need and nothing more.

Check out out!

Cheers,
Chris

Want to share this with others or read it later? View it in a browser.

Share :

Facebook Twitter Google+
0 Komentar untuk "[Go Make Things] Preact builder"

Back To Top