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

Watch works exactly once without polling #379

Closed
mnpenner opened this issue Jan 19, 2016 · 3 comments
Closed

Watch works exactly once without polling #379

mnpenner opened this issue Jan 19, 2016 · 3 comments

Comments

@mnpenner
Copy link

Here's the scenario: I start up webpack-dev-server and wait for my page to finish loading. Then I edit a .less file on my computer, it gets rsync'd into my Vagrant box where webpack-dev-server is running, WDS picks up the change and HMR refreshes my CSS without a full page reload. However, when I edit my .less again then nothing happens. Nothing is logged to Chrome's dev console, and WDS doesn't print anything to the terminal.

If I enable polling,

watchOptions: {
    aggregateTimeout: 250,
    poll: 50
},

then everything works fine.

If I had to take a guess, I suspect rsync is recreating the file and that's destroying the [inotify?] watch. At least that would explain why it works once.

@ghost
Copy link

ghost commented Jan 29, 2016

Ran into this issue today as well.

Adding watchOptions fixes it.

@sigo
Copy link

sigo commented Feb 1, 2016

The same issue here. Problem was affected at all linux-machine at our office. Explicitly defining watchOptions works.

Thanks @mnpenner.

@SpaceK33z
Copy link
Member

Jep, --watch-poll, or the watchOptions equivalent is necessary for Vagrant boxes to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants