Describe the Bug
I have followed the example https://rustwasm.github.io/docs/book/game-of-life/implementing.htm and modified it to use the petgraph crate and try to build a module to use wasm to store tree structure for JS.
The module compiles and seems to work following the tutorial, however if I tried to include the package locally in another project e.g. https://github.com/bbofrk/trying-wasm, or even tried publishing the package on npm (https://www.npmjs.com/package/wasm-tree-structure) then installing in into another project. I am getting the same error
WebAssembly module is included in initial chunk. friendly-errors 09:45:56
This is not allowed, because WebAssembly download and compilation must happen asynchronous.
Steps to Reproduce
- clone https://github.com/bbofrk/trying-wasm
- run
npm install
- run
npm run dev
- See error
Expected Behavior
Should not see compile error
Actual Behavior
WebAssembly module is included in initial chunk. friendly-errors 09:45:56
This is not allowed, because WebAssembly download and compilation must happen asynchronous.
Additional Context
This might have something to do with my webpack.config.js or in this case nust.config.js but I could not tell what should be included. So apologis in advance if its my personal error
Describe the Bug
I have followed the example https://rustwasm.github.io/docs/book/game-of-life/implementing.htm and modified it to use the petgraph crate and try to build a module to use wasm to store tree structure for JS.
The module compiles and seems to work following the tutorial, however if I tried to include the package locally in another project e.g. https://github.com/bbofrk/trying-wasm, or even tried publishing the package on npm (https://www.npmjs.com/package/wasm-tree-structure) then installing in into another project. I am getting the same error
Steps to Reproduce
npm installnpm run devExpected Behavior
Should not see compile error
Actual Behavior
Additional Context
This might have something to do with my webpack.config.js or in this case nust.config.js but I could not tell what should be included. So apologis in advance if its my personal error