我已經熟悉laravel 5.1 mix(elixir)了,最近我決定測試laravel 5.4混合。在laravel 5.4上添加jQuery混合
我混合我的供應商文件庫。
mix
.styles([
'./node_modules/bootstrap/dist/css/bootstrap.css',
'./node_modules/font-awesome/css/font-awesome.css'
], 'public/css/vendor.css')
.js([
'./node_modules/jquery/dist/jquery.js',
'./node_modules/bootstrap/dist/js/bootstrap.js',
], 'public/js/vendor.js')
.disableNotifications()
.version();
幷包括供應商在我的網頁上。
<script src="{{ mix('js/vendor.js') }}" type="text/javascript" charset="utf-8" async defer></script>
但是,當我想使用jQuery我在下面的圖片上有這個錯誤。之前,在laravel 5.1中,我完全是這樣做的。
我有什麼做的?
謝謝!它現在有效 –