Just a WWW
$ wasm-pack build --target web
$ cd www
$ npm start
Via a bundler
- Build
- Link the built npm package
- Set up the app using the linked package
$ wasm-pack build --target bundler
$ cd pkg
$ npm link
$ cd ../webpack
$ npm ci
$ npm link hello-wasm
$ npm start
Note that the pkg/package.json
has a name "hello-wasm"
there.