Reputation: 2028
In assets/js/bootstrap.js
I have:
window._ = require('lodash');
window.Popper = require('popper.js/dist/umd/popper');
try {
window.$ = window.jQuery = require('jquery/dist/jquery.slim');
require('bootstrap');
} catch (e) {}
My package.json
"devDependencies": {
"axios": "^0.17",
"bootstrap": "^4.1.1",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"popper.js": "^1.12.6",
"vue": "^2.5.7"
}
So I guess for ajax
you need jquery
not jquery slim
.
So how do I get only jquery and make laravel 5.6 use jquery instead of the slim version.
Upvotes: 0
Views: 221
Reputation: 14941
Simply include jQuery
instead of jQuery slim
:
window.$ = window.jQuery = require('jquery');
Upvotes: 1