felloz
1 month ago
166
1
Laravel

What does require("bootstrap") ?

Posted 1 month ago by felloz

Actually i have a dashboard builded in bootstrap 4, but for some reason this line require("bootstrap"); its breaking the toggle navbar items. So if i comment the line the toggle start to works right again but idk if that function works for something important in laravel mix.

The file is located in resource/js/bootstrap.js and the file its called in the app.js

This is the code:

window._ = require("lodash");



try {
    window.Popper = require("popper.js").default;
    window.$ = window.jQuery = require("jquery");

    //This is the line that broke my toggle nav bar	
    require("bootstrap");
} catch (e) {}


window.axios = require("axios");

window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";

Please sign in or create an account to participate in this conversation.