Skip to content

webpack does not rebuild after rust source files are changed more than twice. #180

Open
@chmnchiang

Description

@chmnchiang

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

  1. In any directory, run npm init rust-webpack my-app to clone the template.
  2. cd my-app and then npm start to start the dev server.
  3. 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.
  4. Edit src/lib.rs, for example, duplicate the line console::log_1(...) again.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions