Closed dstpierre closed 1 year ago
The JavaScript client library currently only build a bundle that can be imported, for instance in a React application via:
imported
import { Backend } from "@staticbackend/js";
It could be nice to have an option to directly use the library via a <script> tag in vanilla JavaScript, a bit like Alpine.js or htmx:
<script>
<script src="/some/path/backend.js"></script>
I'm not certain if it's possible, I think it's what is called a IIFE. Do we need to update the build system.
In short, I could use the help of a more experienced front-end developer with everything bundling related.
I've added the iife output for the v1.5.0-alpha.0
iife
The JavaScript client library currently only build a bundle that can be
imported
, for instance in a React application via:It could be nice to have an option to directly use the library via a
<script>
tag in vanilla JavaScript, a bit like Alpine.js or htmx:I'm not certain if it's possible, I think it's what is called a IIFE. Do we need to update the build system.
In short, I could use the help of a more experienced front-end developer with everything bundling related.