docs(site): warn that bundled HTML installs need type="module" (#1530)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Renzo Delfino
2026-05-11 10:51:18 +10:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent ff7d901bc4
commit ddfd1f1d6a
@@ -127,6 +127,16 @@ Video.js supports a wide range of file types and hosting services. It's easy to
<ContentWidth>
<HTMLUsageCodeBlock client:idle />
</ContentWidth>
<Aside type="caution" title="Load your script as a module">
When using a bundler (npm, pnpm, yarn, bun), load the resulting bundle with `type="module"`:
```html
<script type="module" src="/dist/player.js"></script>
```
Some bundlers default to an IIFE output format. Loading that bundle without `type="module"` will cause a `StoreError: NO_TARGET` error when interacting with the player. The CDN install path already uses `type="module"` — bundled installs need the same.
</Aside>
</FrameworkCase>
<FrameworkCase frameworks={["react"]}>