Laravel Homestead-在哪里运行npm(虚拟机与Windows 10主机) [英] Laravel Homestead - where to run npm (virtual machine vs. Windows 10 host)

查看:102
本文介绍了Laravel Homestead-在哪里运行npm(虚拟机与Windows 10主机)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 10主机上运行Laravel Homestead Vagrant框.当前,我正在vm中编译资产(运行npm run dev).有时速度很慢,而且我通常在符号链接,运行观察程序等方面遇到问题.-简而言之,我需要 think 进行更多配置,

I am running a Laravel Homestead Vagrant box on Windows 10 host. Currently, I am compiling assets (running npm run dev) inside the vm. It's pretty slow at times, and I usually have problems with symlinks, running watchers etc. - in short, there is more configuration required that I think is necessary,

直接在主机(Windows)机器上编译资产会更好吗?我应该记住任何陷阱"吗?在什么机器上编译JavaScript资产真的重要吗?也就是说,无论我在哪里编译,编译后的版本都可以在生产中"工作吗?

Would it be better to compile assets directly on the host (Windows) machine? Are there any 'gotchas' I should have in mind? Does it really matter on what machine JavaScript assets are compiled? That is, will the compiled version work 'in production' no matter where I compiled it?

推荐答案

是.没关系,还不错.我刚刚使用laravel 5.6进行了测试.

YES. It is all right. I just tested it with laravel 5.6.

这篇关于Laravel Homestead-在哪里运行npm(虚拟机与Windows 10主机)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆