MaxEckel's avatar

[Mix][Laravel 5.4] jQuery object gets hash appended

Hey Guys,

after upgrading to Laravel 5.4 and Laravel Mix i can't get jQuery to work, i require it (like default) in my bootstrap.js:

window.$ = window.jQuery = require('jquery');

The Problem is $ gets recognized, but jQuery not. Thats because the jQuery object gets kind of a hash appended:

jQuery311063018037768710711

Is that because of Mix? I also tried to "autoload" jquery via webpack.mix.js, that doesn't work either. I can't get this to work again, does anyone have the same issue? Or even better found a solution?

Edit:

Ok i found out, this problem only exists with js files which aren't modules. Modules i include via npm can use jQuery. If i pull in a "plugin" directly via cdn etc. they doesn't work.

0 likes
2 replies
MaxEckel's avatar

For now i spent some time finding the "plugins" ,which i haven't pulled in via npm, in npm. Haven't found a real solution yet.

Please or to participate in this conversation.