Skip to content

Commit 19a5ce6

Browse files
committed
Rename examples file so it uses the right module type without reparsing.
1 parent 580f26a commit 19a5ce6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

broodrep-wasm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pnpm test
150150
See the [examples](./examples/) directory for complete usage examples:
151151
152152
- `index.html` - Interactive web demo with file upload
153-
- `usage.js` - Comprehensive JavaScript examples
153+
- `usage.mjs` - Comprehensive JavaScript examples
154154
155155
For the web version, run:
156156
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import path from 'path'
1111
// Import the WASM module
1212
// Note: In a real project, you would install from npm and import normally:
1313
// import { parseReplay, version } from '@shieldbattery/broodrep';
14-
import { parseReplay, version } from '../pkg-node/broodrep_wasm.js'
14+
import { init, parseReplay, version } from '../pkg-node/broodrep_wasm.js'
15+
16+
// Initialize the WASM module
17+
await init()
1518

1619
/**
1720
* Example 1: Basic replay parsing

0 commit comments

Comments
 (0)