Skip to content
Advertisement

Can’t load popper.js with Laravel Mix

I recently upgraded to bootstrap 5 and my tooltips/popovers in my application stopped working. I have the following error in console:

enter image description here

My understanding is that my Laravel Mix / webpack is failing to include popper.js in its compilation? I don’t understand why it is looking for popper.js.map, shouldn’t everything be compiled into a single file (app.js)?

In my webpack.mix.js I have:

JavaScript

In resources/bootstrap.js I have:

JavaScript

and finally in resources/app.js I have:

JavaScript

I have already installed and saved bootstrap and popper via npm. Thanks!

Advertisement

Answer

in bootstrap.js

JavaScript

in webpack.mix.js

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement