Requiring 'bootstrap3-dialog' in Webpack/Laravel Mix results in Bootstrap/Navbar javascript not working
Opened this issue · 3 comments
I'm in the process of converting over my Laravel Elixir asset pipeline which uses Gulp over to Laravel Mix which uses Webpack, and I've come into an issue where at the least the navbar dropdowns (and possibly other Bootstrap-sass javascript features) no longer work.
Is there something specific that I should do to make it work? The latest versions of Bootstrap-sass and Bootstrap3-dialog that I have are 3.3.7 and ^1.35.4.
Are you requiring them in your app.js or bootstrap.js file? Can we see your webpack.mix.js and package.json file to try and track down what missing?
I'm a bit new to webpack, but since the release of bootstrap 4 the npm module for webpack 3 is now called 'webpack3'. Therefore could I suggest that:
module.exports = factory(require('jquery'), require('bootstrap'));
is changed to:
module.exports = factory(require('jquery'), require('bootstrap3'));
And a similar change to line 24.
At the moment installing the dialog module via npm and requiring it causes a build error because it is looking for a non-existent 'bootstrap' module
either that or the project is made compatible with bootstrap 4? (Preferably both so bs 3 legacy users can continue using it).
I hope that makes sense!