Skip to content

Commit 84671e1

Browse files
docs: Fix ES module import to use esm.run to load dependencies
1 parent 47af111 commit 84671e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cheat_sheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you want to control Ruby VM from JavaScript, you can use `@ruby/wasm-wasi` pa
5151
```html
5252
<html>
5353
<script type="module">
54-
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/esm/browser.js";
54+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/browser/+esm";
5555
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/ruby+stdlib.wasm");
5656
const module = await WebAssembly.compileStreaming(response);
5757
const { vm } = await DefaultRubyVM(module);
@@ -117,7 +117,7 @@ Or using `@ruby/wasm-wasi` package API:
117117
```html
118118
<html>
119119
<script type="module">
120-
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/esm/browser.js";
120+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/browser/+esm";
121121
const response = await fetch("https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/ruby+stdlib.wasm");
122122
const module = await WebAssembly.compileStreaming(response);
123123
const { vm } = await DefaultRubyVM(module);

0 commit comments

Comments
 (0)