From 1e98f6b0dd2c41529ffa7c3540165130b3499bb1 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Thu, 21 Mar 2019 13:55:25 -0700 Subject: [PATCH] Use `wasm-pack build --target web` for without-a-bundler example --- examples/without-a-bundler/build.sh | 11 +---------- guide/src/examples/without-a-bundler.md | 3 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/without-a-bundler/build.sh b/examples/without-a-bundler/build.sh index 8f72ba009f5..cb05aadb1a9 100755 --- a/examples/without-a-bundler/build.sh +++ b/examples/without-a-bundler/build.sh @@ -2,14 +2,5 @@ set -ex -# Note that typically we'd use `wasm-pack` to build the crate, but the -# `--web` flag is very new to `wasm-bindgen` and as such doesn't have -# support in `wasm-pack` yet. Support will be added soon though! - -cargo build --target wasm32-unknown-unknown --release -cargo run --manifest-path ../../crates/cli/Cargo.toml \ - --bin wasm-bindgen -- \ - ../../target/wasm32-unknown-unknown/release/without_a_bundler.wasm --out-dir pkg \ - --web - +wasm-pack build --target web python3 -m http.server diff --git a/guide/src/examples/without-a-bundler.md b/guide/src/examples/without-a-bundler.md index 8279dacde17..6c3e0bfd0ea 100644 --- a/guide/src/examples/without-a-bundler.md +++ b/guide/src/examples/without-a-bundler.md @@ -9,9 +9,6 @@ browser directly. For this deployment strategy bundlers like Webpack are not required. For more information on deployment see the [dedicated documentation][deployment]. -> **Note**: the `--web` flag is quite new to `wasm-bindgen`, and does not -> currently have support in `wasm-pack` yet. Support will be added soon though! - First let's take a look at the code and see how when we're using `--web` we're not actually losing any functionality!