Laravel 5.4 沒有 gulp 了,換成了 NPM run production

andu發表於2017-03-04

laravel 5.4 沒有gulp了,換成了 npm run production.
官方文件是:https://learnku.com/docs/laravel/5.4/mix

所以打包css和js檔案的命令由 gulp 換成了npm run production

如果第一次使用 npm run production 命令出錯,有關cross-env等等的錯誤,

Missing binding /home/vagrant/Code/Task/node_modules/node-sass/vendor/linux-x64-48/binding.node

需要重新rebuild 它,命令是:

npm rebuild node-sass --no-bin-links

然後再使用 npm run production

file

注意:新建立的laravel專案預設沒有node_modules,需要 npm install 命令安裝先

file

相關文章