The `vue-cli-plugin-bootstrap-vue` package serves as a `vue-cli` plugin to simplify the integration of BootstrapVue into new or existing Vue CLI projects. It automates the scaffolding and configuration process, including the installation of `bootstrap-vue` and its CSS framework `bootstrap`, and modifies project files such as `main.js` and `vue.config.js` to enable BootstrapVue functionality. The current stable version is 0.8.2, with releases periodically addressing compatibility with newer versions of `@vue/cli`, `BootstrapVue`, and underlying build tools like Sass loaders. Its primary differentiator is providing a rapid setup for BootstrapVue, handling common configuration challenges like SCSS integration, and managing dependency updates to ensure a smooth developer experience.
npm install vue-cli-plugin-bootstrap-vueVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a new Vue project, add the `vue-cli-plugin-bootstrap-vue` plugin, and run a basic example with a BootstrapVue button and alert.
Ensure `sass` (Dart Sass) is installed (`npm install sass` or `yarn add sass`) and `node-sass` is removed (`npm uninstall node-sass`). Update `sass-loader` to a compatible version (e.g., 8.x or newer). Review any custom Sass for compatibility with Dart Sass syntax.
Always execute `git commit -am "Pre-bootstrap-vue plugin install"` or `git stash` immediately before invoking `vue add bootstrap-vue` to create a rollback point.
Upgrade to the latest `vue-cli-plugin-bootstrap-vue` and ensure `bootstrap-vue` is also updated to a compatible modern version (e.g., `2.x`) in your `package.json`.
Verify that `sass` (Dart Sass) and `sass-loader` are correctly installed as devDependencies and properly configured in your project's `package.json` and Webpack configuration (typically handled by Vue CLI).
The plugin moved to `sass` (Dart Sass) in `v0.6.0`. Remove `node-sass` (`npm uninstall node-sass`) and install `sass` (`npm install sass`). You might also need to rebuild dependencies (`npm rebuild`).
Ensure `bootstrap-vue` and `bootstrap` are correctly listed in `package.json` and installed (`npm install` or `yarn install`). Try running `vue add bootstrap-vue` again, or manually install them (`npm install bootstrap-vue bootstrap`).
Verify that `import 'bootstrap-vue/dist/bootstrap-vue.css';` (or the equivalent SCSS import if using SCSS) is present in your `main.js` or a primary style entry point. Ensure `css-loader` and `vue-style-loader` are correctly configured in your project's Webpack setup (usually handled by Vue CLI).