mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-11 14:46:04 +00:00
Merge pull request #1382 from fitzgen/wasm-pack-web-target
Use `wasm-pack build --target web` for without-a-bundler example
This commit is contained in:
commit
93cab3d755
@ -2,14 +2,5 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Note that typically we'd use `wasm-pack` to build the crate, but the
|
wasm-pack build --target web
|
||||||
# `--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
|
|
||||||
|
|
||||||
python3 -m http.server
|
python3 -m http.server
|
||||||
|
@ -9,9 +9,6 @@ browser directly. For this deployment strategy bundlers like Webpack are not
|
|||||||
required. For more information on deployment see the [dedicated
|
required. For more information on deployment see the [dedicated
|
||||||
documentation][deployment].
|
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`
|
First let's take a look at the code and see how when we're using `--web`
|
||||||
we're not actually losing any functionality!
|
we're not actually losing any functionality!
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user