wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

hot reloading does not work anymore from version 0.10.2

Open QuentinJanuel opened this issue 2 years ago • 1 comments

I have a webpack project where I use wasm-pack to build one of my node dependencies. It all worked fine on v0.10.1 but since v0.10.2 there is the following bug:

  • compile rust code
  • start the webpack devserver
  • recompile the rust code At this point,
  • on v0.10.1, webpack simply reloadsthe page
  • on v0.10.2, webpack returns a "Module not found" compilation error

I have no idea what is causing this, and I just went back to using the ver0.10.1.

rustc version: 1.59.0

Please tell me if there is any detail I should include.

QuentinJanuel avatar Mar 22 '22 13:03 QuentinJanuel

Related wasm-tool/wasm-pack-plugin#125 There's a working solution in the thread :

watchOptions: {
   aggregateTimeout: 200,
   poll: 200,
},

Adding this options to webpack.config.js resolves the issue for me.

PanAeon avatar Jun 06 '22 10:06 PanAeon