Skip to content

Commit d70be1e

Browse files
authored
Merge pull request #1367 from josephrocca/patch-1
Add `--target web` to quick start build command
2 parents a14c9f6 + 4da7e4a commit d70be1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/src/quickstart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
1. [Install this tool.]
55
1. Run `wasm-pack new hello-wasm`.
66
1. `cd hello-wasm`
7-
1. Run `wasm-pack build`.
7+
1. Run `wasm-pack build --target web`.
88
1. This tool generates files in a `pkg` dir
9+
1. Import it: `import init, { greet } from "./pkg/hello_wasm.js"`, initialize it: `await init()`, and then use it: `greet()`
910
1. To publish to npm, run `wasm-pack publish`. You may need to login to the
1011
registry you want to publish to. You can login using `wasm-pack login`.
1112

0 commit comments

Comments
 (0)