Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1713
Closed
Open
Issue created Mar 04, 2017 by Administrator@rootContributor

Hot reloading no longer works after switching back to default WebpackDevServer client

Created by: twig

I had to switch to the default WebpackDevServer client because it allowed me to specify the server address. I've found that doing so breaks the hot reloading functionality completely.

I have another project created by an older version of create-react-app (sorry, can't remember what version) but it's using the same version of webpack-dev-server and configuration and works fine. That's with the same node/npm.

Can you reproduce the problem with latest npm?

I'm currently using the latest node and npm available (node 6.10.0 / npm 3.10.10)

Description

Hot reload does not work with the default webpack-dev-server client

Expected behavior

Hot reload should work with the default webpack-dev-server client.

Actual behavior

There is no websocket connection attempt made to the address specified (http://localhost:3000/), hence hot reload can never be triggered by a code change.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (I've ejected)
  2. node -v: 6.10.0
  3. npm -v: 3.10.10

Then, specify:

  1. Operating system: Windows 7 x64
  2. Browser and version: Chromium, Firefox, Vivaldi

Reproducible Demo

Steps to reproduce:

With the latest node/npm/yarn

  • npm install -g create-react-app

  • create-react-app hotreload

  • cd hotreload

  • yarn start

  • Test that hot reload works by editing App.js

  • Stop the server

  • yarn eject

  • confirm Y

  • yarn start

  • Test that hot reload works by editing App.js

  • edit hotreload/config/webpack.config.dev.js

  • find line 43: require.resolve('react-dev-utils/webpackHotDevClient'),

  • comment it out and replace it with require.resolve('webpack-dev-server/client') + '?http://localhost:3000/',

  • yarn start

  • Test that hot reload works by editing App.js

  • Hot reload no longer works

Assignee
Assign to
Time tracking