我在vagrantfile中有这个:
config.vm.synced_folder ".", "/vagrant",
type: "rsync", rsync__auto: true, rsync__exclude: [".git/", "django/"]
Run Code Online (Sandbox Code Playgroud)
+我vagrant rsync-auto
在单独的标签中运行.
在对文件进行更改后,需要使用vagrant~5s来获取它并进行rsync.
无论如何加快这个速度?我用它来进行webpack/hot-module-reloading.
有一个稍微过时的插件vagrant-gatling-rsync
旨在解决这种情况。
https://github.com/smerrill/vagrant-gadling-rsync
您应该能够使用安装它
$ vagrant plugin install vagrant-gatling-rsync
Run Code Online (Sandbox Code Playgroud)
然后你可以(可选)将其添加到你的 Vagrantfile 中:
config.gatling.rsync_on_startup = true
Run Code Online (Sandbox Code Playgroud)
不再需要上面的行,因为这是插件的默认行为。
您应该能够通过将现有$ vagrant rsync-auto
命令替换为插件中的匹配命令来触发此功能:
$ vagrant gatling-rsync-auto
Run Code Online (Sandbox Code Playgroud)
根据我个人的经验,自 Vagrant 的 rsync 版本左右以来,我还没有发现内置版本有任何问题1.9.0
,但这可能对您的情况有所帮助。
归档时间: |
|
查看次数: |
556 次 |
最近记录: |