bigskysoftware / bigskysoftware/_hyperscript
Doesn't work when bundling
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Make a new folder and run these four commands to set up a basic bundle with [esbuild](https://esbuild.github.io/) (webpack competitor):
```
npm install htmx.org hyperscript.org esbuild
echo 'require("htmx.org/dist/htmx.js"); require("hyperscript.org/dist/_hyperscript.js");' > app.js
npm exec -- esbuild app.js --bundle --outfile=bundle.js
echo '' > index.html
```
... and then open `index.html` in the browser. htmx successfully loads and works, but hyperscript breaks with a couple of these errors:
```
Uncaught ReferenceError: _hyperscript is not defined
```
It looks like hyperscript's module loading wrapper is only applied to the runtime, and not the individual commands.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.