Replies: 1 comment
-
I found out the problem. I have "BImgLazy" in a custom component that was not lazy-loaded in my entry-point. After I lazy-loaded it, bootstrap-vue stopped being included in the chunk-vendors. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm lazy-loading bootstrap-vue modules in my Vue 2 app, but despite it is not being imported in the main.js file, it still shows up in my main bundle, adding almost 33kb of parsed size. I'm installing only the modules I need on some components using like "import { BModal } from 'bootstrap-vue'". Only 'bootstrap-vue/dist/bootstrap-vue.min.css' is being imported in the main.js file (and it still show up in the main bundle if I comment the CSS in main.js).
I'm using Webpack 5 and Vue CLI 5. All the routes are lazy-loaded in Vue-Router.
The strange thing is that I did a test a few weeks ago by removing all BV modules from the main.js file (when a few modules were still being imported globally) and at the time it did not showed up in the main bundle.
I'm also using Bootstrap 5 but importing globally only the JS modules that I need.
My main.js looks like this:
my vue.config.js file is:
I have created a plugin for the BV "ModalPlugin" module:
bv-modal-plugin.js
and I'm installing it on some components using:
Any clue why is this happening?
Beta Was this translation helpful? Give feedback.
All reactions