Laravel 5.5 not loading jquery / vuejs

I recently installed laravel 5.5. I will use VueJS, but every time I load the page, my VueJS does not work. Sample due to jquery not loading.

I also use twitter bootstrap, which also fails to load. Only sass files are downloaded. If I use CDN for jquery and bootstrap, they work fine. But VueJS is not working.

I have npm and I don't get any compilation errors (npm run watch or npm run dev).

My app.js applications:

require('./bootstrap');
window.Vue = require('vue');

If I try to execute console.log anything in this file, it also does not show anything in my console, which is really strange.

There are also the following two lines in my bootstrap.js:

window.$ = window.jQuery = require('jquery');
require('bootstrap-sass');

, , , , (ghostery).

loading pref showConsoleLogs before prefs were initialised, you will not get the correct result

, ( -):

mix.autoload({
    jquery: ['$', 'window.jQuery',"jQuery","window.$","jquery","window.jquery"]
});

app.js, , :

$(document).ready(function(){
    console.log('test');
});

UPDATE

- , :  - , /js/app.js, . , , js. , , .  - jquery cdn, jquery, app.js bootstrap.js

: LARAVEL

+4
1

npm install && npm run dev, , , php artisan serve. , , , app.js. , . .

0

Source: https://habr.com/ru/post/1690941/


All Articles