mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
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:
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"]}>
|
||||
|
||||
Reference in New Issue
Block a user