Grunt watch detects file changes only after 5 seconds with Vagrant and NFS

前端 未结 1 617
执念已碎
执念已碎 2020-12-30 07:31

Grunt watch (grunt-contrib-watch) is used to trigger reload of web app in browser. However, it is slow to notice file changes when running in a Vagrant virtual machine usin

1条回答
  •  Happy的楠姐
    2020-12-30 08:17

    Try these mount options in your Vagrantfile:

    type: "nfs", mount_options: ['actimeo=1']

    This will greatly reduce the NFS file attribute caching timeout. I was having similar troubles, seeing large delays with Vagrant/NFS when waiting for gulp and Django server reloads. This fixed it; file changes are now detected instantly.

    0 讨论(0)
提交回复
热议问题