大家好我全新安装了Laravel 5.4,
当npm run dev
cpu运行很多时,200%。
我需要"观看"我的资产文件发生了变化,我运行npm run watch
,没有用。
我在mac上使用vagrant(virtualbox),我在webpack doc上阅读,在这个环境中我需要使用npm run watch-poll
,它可以工作,但我的CPU在手表时工作率为200%。
我尝试在我的webpack.config.js上设置ignore: '/node_modules/'
,但似乎无效。
任何想法?
全部
答案 0 :(得分:1)
进入/node_modules/watchpack/lib/DirectoryWatcher.js
并找到ignored
选项。将其设置为/node_modules/
,没有引号。到目前为止,这是我的解决方案。