A bundler assembles code and libraries into a module or executable script. For WebAssembly used as a library in a JavaScript component, the bundler target makes the code importable; separate browser scripts instead require pages to track which scripts they load and how they interact. section 9.4
Listing 9.12 Console: Bundling the library
wasm-pack build --target bundler cd pkg npm link cd ../papers-list
Build the WebAssembly package for a bundler, then link it into the application project. section 9.4
Listing 9.13 package.json: Adding local dependency
"dependencies": {
"papers": "file:../pkg",
...
}
Declare the generated WebAssembly package as a local project dependency. section 9.4







