bigskysoftware / bigskysoftware/_hyperscript
Doesn't work when bundling
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.8k
- Forks
- 172
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduce el problema con los cuatro comandos en una carpeta nueva usando esbuild y, después, inspecciona el wrapper de carga de módulos alrededor del runtime de hyperscript y de los comandos individuales. Se considera terminado cuando el bundle generado se carga en index.html y hyperscript funciona sin el ReferenceError _hyperscript.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100