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

Add option for setting webpack watch option polling #1459

Conversation

AJamesPhillips
Copy link
Contributor

The motivation was for enabling using a virtualbox virtual machine with hot code reloading.
The rsync and normal file synchronisation provided by vagrant 1.9.1 and 5.1.14 does not
trigger webpack to hot reload the code. By being able to provide an optional environment
variable hot reloading works with vagrant/virtualbox. For example:

$ WEBPACK_WATCH_POLL=1000 npm start

Problem and solution discussed by others here:
http://stackoverflow.com/questions/34937294/how-to-enable-hot-reloading-via-shared-folders-with-vagrant-vm#comment64629465_34937378

The motivation was for enabling using a virtualbox virtual machine with hot code reloading.
The rsync and normal file synchronisation provided by vagrant 1.9.1 and 5.1.14 does not
trigger webpack to hot reload the code.  By being able to provide an optional environment
variable hot reloading works with vagrant/virtualbox.  For example:

    $ WEBPACK_WATCH_POLL=1000 npm start

Problem and solution discussed by others here:
http://stackoverflow.com/questions/34937294/how-to-enable-hot-reloading-via-shared-folders-with-vagrant-vm#comment64629465_34937378
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@AJamesPhillips
Copy link
Contributor Author

This is not the best interface, and this pull request also does not include documentation, so am very happy to review / rewrite or ultimately discuss and accept / reject this proposal.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon
Copy link
Contributor

gaearon commented Jan 27, 2017

Is there any way we can detect this instead of adding a configuration option?

@AJamesPhillips
Copy link
Contributor Author

AJamesPhillips commented Jan 28, 2017

@gaearon ideally webpack would detect the change to the file and or vagrant/virtualbox would trigger the correct hook on syncing the file. I'll try to dig into it next week to see where the problem might be. Any pointers / advice from your side would be appreciated. And yes I agree it would be preferable for webpack to detect the file change correctly as opposed to adding this config option.

@gaearon
Copy link
Contributor

gaearon commented Feb 12, 2017

Please see https://github.com/facebookincubator/create-react-app/issues/1049#issuecomment-261738388—let's just get it into chokidar and then it will work for every tool instead.

@gaearon gaearon closed this Feb 12, 2017
@AJamesPhillips AJamesPhillips deleted the add_webpack_watch_poll_env_option branch February 12, 2017 09:31
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants