wasm-bindgen/examples/without-a-bundler-no-modules
Alex Crichton b56233a3ad Remove type=module from no-modules example
We're not using ES modules, so use just a normal script!

Closes #2182
2020-06-03 08:40:54 -07:00
..
src Implement the local JS snippets RFC 2019-03-05 08:00:47 -08:00
Cargo.toml Implement the local JS snippets RFC 2019-03-05 08:00:47 -08:00
index.html Remove type=module from no-modules example 2020-06-03 08:40:54 -07:00
README.md docs: update docs link 2019-05-26 16:43:00 +09:00

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.