【发布时间】:2017-07-26 16:45:57
【问题描述】:
我已经熟悉 laravel 5.1 mix (elixir),最近决定测试 laravel 5.4 mix。
我在供应商文件中混合了我的库。
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 中我就是这样做的。
我该怎么办?
【问题讨论】: