Bootstrap-vue: Install without Popper.js?

Created on 11 Jul 2019  路  1Comment  路  Source: bootstrap-vue/bootstrap-vue

Is your feature request related to a problem? Please describe...

The webpack-bundle-analyzer shows Popper.js as being a large part of my bundle size. I'm not using any Pop-overs. Just: import { ButtonPlugin, NavbarPlugin, CarouselPlugin } from 'bootstrap-vue';

Describe the solution you'd like

I'd like popper.js not installed if not needed and therefore a smaller bundle size.

Additional context

According to this post on Stack Overflow: https://stackoverflow.com/a/47774860

Bootstrap 4 Beta - Is Popper.js required?

Not anymore, check THIS issue It seems Bootstrap has bundled Popper and Bootstrap v4 into a bundle.min.js file that is available if you try downloading now. HERE is a link directly to the bundled min file. Hope that helps someone who is not interested in adding a separate popper file
Answered Question

Most helpful comment

We only bundle popper.js in the browser UMD bundle now... so it shouldn't be getting added to your final bundle if you are not importing anything that uses dropdown, tooltips or popovers.

Note in your case, the navbar plugin includes dropdown plugin, which does use popper.js.

If you are not are not using dropdowns in your navbar, you can just import only the navbar/nav components you need, and not import BNavItemDropdown.

>All comments

We only bundle popper.js in the browser UMD bundle now... so it shouldn't be getting added to your final bundle if you are not importing anything that uses dropdown, tooltips or popovers.

Note in your case, the navbar plugin includes dropdown plugin, which does use popper.js.

If you are not are not using dropdowns in your navbar, you can just import only the navbar/nav components you need, and not import BNavItemDropdown.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kossa picture kossa  路  3Comments

KonradDeskiewicz picture KonradDeskiewicz  路  3Comments

DavidRueter picture DavidRueter  路  3Comments

chris-canipe picture chris-canipe  路  3Comments

ronjouch picture ronjouch  路  3Comments