Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR not working when using bash on windows 10 #166

Closed
nionis opened this issue Oct 31, 2016 · 1 comment
Closed

HMR not working when using bash on windows 10 #166

nionis opened this issue Oct 31, 2016 · 1 comment

Comments

@nionis
Copy link

nionis commented Oct 31, 2016

This is an issue that occurs on HMR and is fixed by using polling in the webpackdevserver config, example:

const webpack = require('webpack'),
  WebpackDevServer = require('webpack-dev-server'),
  config = require('./webpack.config')

new WebpackDevServer(webpack(config), {
  publicPath: config.output.publicPath,
  // hot: true,
  historyApiFallback: true,

  //for bash on windows
  watchOptions: {
    aggregateTimeout: 300,
    poll: 1000
  },
}).listen(3000, 'localhost', (err, result) => {
  if (err) return console.log(err)
  console.log('Listening at http://localhost:3000/')
})

I assume we will have to wait for this ?

@nkzawa
Copy link
Contributor

nkzawa commented Oct 31, 2016

Hi, thanks for your report and nice information. Do we have a way to detect if it's bash on windows on Node ? In this case, I think we should support it as default.

watchOptions: isBashWindows() ? : {
   aggregateTimeout: 300,
   poll: 1000
} : null

rauchg pushed a commit that referenced this issue Nov 28, 2016
* Add Polling for Bash on Windows

Fixes #166

* Add Windows Bash Dependency
@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants