Skip to content

client javascript doesn't reload the page if there's a build-time error on first load #1316

@hexpunk

Description

@hexpunk
  • Operating System: MacOS High Sierra, Ubuntu 16.04
  • Node Version: 8.9.4
  • NPM Version: 5.6.0
  • webpack Version: 3.11.0
  • webpack-dev-server Version: 2.11.1
  • This is a bug
  • This is a modification request

Code

I've made a repository that minimally recreates this issue. JayAndCatchFire/minimal-wds-bug-example

Expected Behavior

Scenario 1

  1. The user's code being packed with webpack has a build-time error in it.
  2. The user starts webpack-dev-server and navigates to the app in their browser. The app doesn't fully load due to the build-time error.
  3. The build-time error in the user's code is corrected and webpack successfully rebuilds the bundle.
  4. Webpack-dev-server should reload the app page with the newly built code.

Scenario 2

  1. The user has been running webpack-dev-server for a bit and introduces a code change in their code that includes a build-time error.
  2. The user navigates to their app in a browser with a fresh tab at this point or manually hard-reloads the page at this point. The app doesn't fully load due to the build-time error.
  3. The build-time error in the user's code is corrected and webpack successfully rebuilds the bundle.
  4. Webpack-dev-server should reload the app page with the newly built code.

Actual Behavior

In both of the above scenarios, the fourth step doesn't occur. The page remains in a broken state.

For Bugs; How can we reproduce the behavior?

The steps outlined in the scenarios above should outline how to reproduce the bug reliably, although I give more detailed instructions in the README file in my example repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions