Reputation: 1172
How to bundle popper with Bootstrap 5 alpha which has just been released?
Upvotes: 2
Views: 2732
Reputation: 42
Include every Bootstrap JavaScript plugin and dependency with one of the two bundles. Both bootstrap.bundle.js and bootstrap.bundle.min.js include Popper for tooltips and popovers.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
If you decide to go with the separate scripts solution, Popper must come first (if you’re using tooltips or popovers).
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
And then the JavaScript plugins:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
Upvotes: 0
Reputation: 6704
Bootstrap 5, just like v4 comes by default with JS bundle - Bootstrap JS + popper. You don't need to do anything by yourself.
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.bundle.min.js"></script>
Or download full package from https://v5.getbootstrap.com
Upvotes: 2