You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running yarn start should start a dev-server that will recompile webpack bundle every time the rust source file is changed, but it fails to do so after a few changes.
Steps to Reproduce
In any directory, run npm init rust-webpack my-app to clone the template.
cd my-app and then npm start to start the dev server.
Edit src/lib.rs, for example, duplicate the line console::log_1(...). The browser will reload and we could see Hello world! get print twice in the console.
Edit src/lib.rs, for example, duplicate the line console::log_1(...) again.
See below.
If applicable, add a link to a test case (as a zip file or link to a repository we can clone).
Expected Behavior
The wasm file get recompiled, the bundle is rebuilt and the browser reloads.
Actual Behavior
The wasm file get recompiled, however, the bundle is never rebuild and the browser does not reload. Manually reload the browser does not solve the issue because the bundle isn't rebuilt.
The text was updated successfully, but these errors were encountered:
This seems to be an issue with webpack or webpack-dev-server itself. The wasm file is built with a hash for long-term caching and this hash seems not to update more than once. I had the exact same issue with the game-of-life tutorial and tried to fix it for several hours until i gave up. After seeing that the same issue seems to exist on this repository i got suspicous and changed the versions in webpack from ^ to exact syntax, so instead of ^4.42.0 i went 4.42.0 and so on with all dependencies. That fixes it. So it seems some allegedly "minor" patch broke this in one of the dependencies. And it is still buggy in Webpack 5 even, as it seems, since i tried to fix by migrating to 5 and it didn't work.
If someone has the time to dig deeper and find out what exact dependency causes this and create an issue in the repo of the corresponding library (probably webpack itself) i would be more than glad. Unfortunately I will not find that time in the next weeks myself.
If someone has the time to dig deeper and find out what exact dependency causes this and create an issue in the repo of the corresponding library (probably webpack itself) i would be more than glad. Unfortunately I will not find that time in the next weeks myself.
Describe the Bug
Running
yarn start
should start a dev-server that will recompile webpack bundle every time the rust source file is changed, but it fails to do so after a few changes.Steps to Reproduce
npm init rust-webpack my-app
to clone the template.cd my-app
and thennpm start
to start the dev server.src/lib.rs
, for example, duplicate the lineconsole::log_1(...)
. The browser will reload and we could seeHello world!
get print twice in the console.src/lib.rs
, for example, duplicate the lineconsole::log_1(...)
again.If applicable, add a link to a test case (as a zip file or link to a repository we can clone).
Expected Behavior
The wasm file get recompiled, the bundle is rebuilt and the browser reloads.
Actual Behavior
The wasm file get recompiled, however, the bundle is never rebuild and the browser does not reload. Manually reload the browser does not solve the issue because the bundle isn't rebuilt.
The text was updated successfully, but these errors were encountered: