bigskysoftware / bigskysoftware/_hyperscript
Doesn't work when bundling
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 172
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
esbuild を使用して新しいフォルダーで 4 つのコマンドを実行し、問題を再現してから、hyperscript ランタイムと個々のコマンドを囲むモジュール読み込みラッパーを調査します。生成されたバンドルが index.html で読み込まれ、hyperscript が _hyperscript ReferenceError なしで動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- build-system
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100