⚛️ Build custom, self-contained & self-hosted Preact script in the browser
MIT License
Build custom, self-contained & self-hosted Preact script in the browser
Standalone Preact Builder generates a standalone JavaScript file that contains Preact and its most popular dependencies, to be self-hosted along with the rest of a JS app.
The generator runs in the browser; no installation is needed.
ESM
will allow the script to be imported from a <script type="module">
IIFE
will expose a window.standalonePreact
object in the browser context, containing the requested importsPreact offers two major advantages compared to the original React:
When using Preact without build tools, users are advised to rely on a CDN to import Preact into their app (esm.sh/preact
for instance, and a few other CDNs provide the same feature) but:
This project exists as an answer to those problems.
This project uses semver.
Version | Date | Notes |
---|---|---|
1.5.0 |
2024-07-21 | Expose html , update deps, add mandatory imports |
1.4.0 |
2024-07-05 | Add more defaults |
1.3.0 |
2024-03-24 | Update deps, add signals & useState examples |
1.2.1 |
2023-10-14 | Fix ESM example |
1.2.0 |
2023-10-14 | Add format in filename |
1.1.0 |
2023-10-04 | Add md5 substring in code & downloaded file to simplify self-hosting |
1.0.0 |
2023-10-01 | Initial version |
This project is released under the MIT License.