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

make it work for mounted folders #3

Closed
wants to merge 1 commit into from
Closed

Conversation

xiankai
Copy link

@xiankai xiankai commented Oct 22, 2015

I was trying to get this to work in conjunction with the jspm hot reloader. However with my project on a shared folder in the VM, the file change events were not being emitted.

After doing some checking, I chanced upon paulmillr/chokidar#242 and it turns out that it's a known issue that requires a simple configuration change.

@capaj
Copy link
Owner

capaj commented Oct 22, 2015

@xiankai thanks for reporting this. I don't develop on mounted drives so I never ran into it. I am a bit hesitant to merge this because chokidar performs better when not polling for changes.
Do you think that it would be possible to make sure that the base folder is mounted with https://www.npmjs.com/package/node-df and then enable it only if true?
I want to introduce .chokidar or some similar config like that which might be used to configure chokidar even more. But if we can make it smart even without any configs, I think we should try.

@xiankai
Copy link
Author

xiankai commented Oct 22, 2015

Sorry, I didn't know there was a performance drawback to the config change. As for node-df, I am not sure how that package works, but in my case (using vagrant on virtualbox), it is virtualbox that is mounting the folder and thus kinda out of the scope of the VM. Additionally, I'm not sure if there's an easy way to check whether the folder is mounted or not (Docker and other VM providers come to mind, too many different cases).

I am definitely in favor of a config file though.

@capaj
Copy link
Owner

capaj commented Oct 22, 2015

@xiankai the simplest solution was to extend chokidar options with a chokidar prop from opts. So version 0.2.1 should resolve this issue.
Just use

chokidarEvEmitter({port: 8090, path: '.', chokidar: {usePolling: true}})

wherever you're calling chokidar-scoket-emitter

@capaj capaj closed this Oct 22, 2015
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

Successfully merging this pull request may close these issues.

2 participants