mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-12 19:13:10 +03:00
b56233a3ad
We're not using ES modules, so use just a normal script! Closes #2182 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
index.html | ||
README.md |
Without a Bundler Using --target no-modules
View documentation for this example online
You can build the example locally with:
$ wasm-pack build --target no-modules
and then opening index.html
in a browser should run the example!
Note that this example is in contrast to the without a bundler example
which performs a similar purpose except it uses --target no-modules
instead of
--target web
. The main difference here is how the shim JS and module are
loaded, where this example uses old-school script
tags while --target web
uses ES modules.