Hi,
I have tried to get jquery working but I am failing.
I took the basic laravel installation that includes already bootstrap for the User/Login
and just to be sure installed jquery again via npm
I included this in resources/js/app.js
//already there:
require('./bootstrap');
//new
import $ from 'jquery';
window.$ = window.jQuery = $;
and in webpack.mix.js this is all there is
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
I run npm run dev but I add just like this
$( document ).ready(function() {
console.log( "ready!" );
});
I get following error: $(document).ready(function() $ is not defined
I tried $, jQuery, jquery but I seem to oversee something essential.