Skip to content

docs: add note about setting up an alias to vue in project bundlers #3133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions docs/markdown/intro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,28 @@ values and functions between files by default.
For information on theming Bootstrap, check out the [Theming](/docs/reference/theming) reference
section.

<div class="alert alert-info mb-0">
<p class="mb-2">
BootstrapVue and PortalVue require access to the global <code>Vue</code> reference (via <code>
import Vue from 'vue'</code>).
</p>
<p class="mb-2">
If you are using a specific build of Vue (i.e. runtime-only vs. compiler + runtime), you will
need to set up an alias to <code>'vue'</code> in your bundler config to ensure that your
project, BootstrapVue and PortalVue are all using the same build version of Vue. If you are
seeing an error such as <code>"$attr and $listeners is readonly"</code>, then you will need to
set up an alias.
</p>
<p class="mb-0">
See the
<a class="alert-link" href="https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only">Vue.js
Guide</a> for details on setting up aliases for
<a class="alert-link" href="https://webpack.js.org/">webpack</a>,
<a class="alert-link" href="https://rollupjs.org/">rollup.js</a>,
<a class="alert-link" href="hhttps://parceljs.org/">Parcel</a>, etc.
</p>
</div>

## Nuxt.js module

[Nuxt.js](https://nuxtjs.org/) version <code>{{ nuxtVersion }}</code> (or greater) is recommended.
Expand Down Expand Up @@ -404,9 +426,9 @@ bundler supports es modules, it will automatically prefer it over commonjs.
| commonjs2 | webpack 1 / ... | `dist/bootstrap-vue.common.js` _or_ `dist/bootstrap-vue.common.min.js` |
| UMD | Browser | `dist/bootstrap-vue.js` _or_ `dist/bootstrap-vue.min.js` |

BootstrapVue relies on `Popper.js` (for Tooltip, Popover, and Dropdown positioning), `PortalVue` (for
toasts, etc), and `vue-functional-data-merge` (for functional components). These three dependencies
are included in the `commonjs2` and `UMD` bundles.
BootstrapVue relies on `Popper.js` (for Tooltip, Popover, and Dropdown positioning), `PortalVue`
(for toasts, etc), and `vue-functional-data-merge` (for functional components). These three
dependencies are included in the `commonjs2` and `UMD` bundles.

## Migrating a project already using Bootstrap

Expand Down