I’m currently trying to make dropdown menus work in Bootstrap 5. I read this functionality requires Popper.js, but I don’t know how to include it (Laravel project using Laravel mix) properly.
I’ve tried the following.
window.Popper = require(“@popperjs/core”) import { createPopper } from '@popperjs/core' import '@popperjs/core'
None of this seems to enable the Bootstrap dropdown functionality that I want! What am I doing wrong?
Advertisement
Answer
did you try with the bootstrap.js
file?
window.Popper = require('popper.js').default; window.$ = window.jQuery = require('jquery'); require('bootstrap');
this file is used when you install laravel ui