Skip to content

Commit 93cab3d

Browse files
authored
Merge pull request #1382 from fitzgen/wasm-pack-web-target
Use `wasm-pack build --target web` for without-a-bundler example
2 parents d49d8c9 + 1e98f6b commit 93cab3d

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

examples/without-a-bundler/build.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,5 @@
22

33
set -ex
44

5-
# Note that typically we'd use `wasm-pack` to build the crate, but the
6-
# `--web` flag is very new to `wasm-bindgen` and as such doesn't have
7-
# support in `wasm-pack` yet. Support will be added soon though!
8-
9-
cargo build --target wasm32-unknown-unknown --release
10-
cargo run --manifest-path ../../crates/cli/Cargo.toml \
11-
--bin wasm-bindgen -- \
12-
../../target/wasm32-unknown-unknown/release/without_a_bundler.wasm --out-dir pkg \
13-
--web
14-
5+
wasm-pack build --target web
156
python3 -m http.server

guide/src/examples/without-a-bundler.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ browser directly. For this deployment strategy bundlers like Webpack are not
99
required. For more information on deployment see the [dedicated
1010
documentation][deployment].
1111

12-
> **Note**: the `--web` flag is quite new to `wasm-bindgen`, and does not
13-
> currently have support in `wasm-pack` yet. Support will be added soon though!
14-
1512
First let's take a look at the code and see how when we're using `--web`
1613
we're not actually losing any functionality!
1714

0 commit comments

Comments
 (0)