I followed the instructions in https://getbootstrap.com/docs/4.0/getting-started/webpack/ and I also installed jquery and popper.js with npm.
Still when I use the output bundle.js, the browser keeps on sending GET requests for popper.js.map and I need all the assets to be part of the bundle.js.
I searched a lot for the proper answer but none that explains whats wrong with the instructions mentioned above, exists. Please help.
Bootstrap depends on Popper, which is specified in the peerDependencies property. This means that you will have to make sure to add both of them to your package.
However, Bootstrap 4 can be used without Popper. js, if we don't use tooltips, popovers nor dropdowns. For example, navbar's JS functionality (mobile menu on the right) works well without Popper. js.
Bootstrap has dependency on Jquery and Popper js.
At the very end of the popper.js file there is a comment like this:
//# sourceMappingURL=popper.js.map
Removing the commented line fixed the issue for me.
If you are using Laravel 5+ and/or Laravel Mix, this should help:
To make the warning go away, simply add .sourceMaps()
to your js-file(s) in webpack.mix.js
:
mix.js('resources/js/app.js', 'public/js').sourceMaps();
The method will tell Laravel Mix to includes the source maps, since they are disabled as default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With