-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Add Polling for Bash on Windows #302
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have also uses some ES2015 features(arrow functions, const) in your package. See.
This may cause issues if the user is using an older node. (before v4).
@nkzawa do we need to support any older node versions?
If not, this is not an issue.
@IanMitchell anyway, writing your package in ES5 is pretty trivial as well :)
@@ -1,6 +1,7 @@ | |||
import { join, relative, sep } from 'path' | |||
import webpackDevMiddleware from 'webpack-dev-middleware' | |||
import webpackHotMiddleware from 'webpack-hot-middleware' | |||
import isWindowsBash from 'is-windows-bash' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add is-windows-bash
to the package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use absolute versions, so use that. I mean versions like 0.8.1
not ^0.8.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops, totally forgot to check that in. Will update my package to support ES5 as well.
EDIT: Done, published ES5 changes and using that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
Really neat stuff. Thank you |
Per an official source, reading the
/proc/version
file and searching for 'Microsoft' is currently the best way to detect if a user is running Bash on Windows. I wrote a small package that checks to see if the user is on Linux and Bash, and if they are will read that file to check if it's a Windows environment. If it is, I add polling to the webpack dev server.First time doing something like this, so if I've gone about this the wrong way completely a course adjustment would be much appreciated 😄
Fixes #166