@@ -104,10 +104,10 @@ browsers and devices while providing slightly more opinionated resets to common
104
104
105
105
## Using module bundlers
106
106
107
- If you are using module bundlers like [ webpack ] ( https://webpack.js.org/ ) ,
108
- [ rollup.js] ( https://rollupjs.org/ ) , etc, you may prefer to directly include the package into your
109
- project. To get started, use ` yarn ` or ` npm ` to get the latest version of Vue.js, BootstrapVue and
110
- Bootstrap v4:
107
+ If you are using module bundlers like [ Webpack ] ( https://webpack.js.org/ ) ,
108
+ [ Parcel ] ( https://parceljs.org/ ) or [ rollup.js] ( https://rollupjs.org/ ) , you may prefer to directly
109
+ include the package into your project. To get started, use ` yarn ` or ` npm ` to get the latest version
110
+ of Vue.js, BootstrapVue and Bootstrap v4:
111
111
112
112
``` bash
113
113
# With npm
@@ -117,7 +117,7 @@ npm install vue bootstrap-vue bootstrap
117
117
yarn add vue bootstrap-vue bootstrap
118
118
```
119
119
120
- Then, register BootstrapVue plugin in your app entry point:
120
+ Then, register BootstrapVue in your app entry point:
121
121
122
122
``` js
123
123
// app.js
@@ -143,9 +143,11 @@ Or import Bootstrap and BootstrapVue `scss` files via a single custom SCSS file:
143
143
@import ' node_modules/bootstrap-vue/src/index.scss' ;
144
144
```
145
145
146
+ Finally import the ` custom.scss ` file in your app entry point:
147
+
146
148
``` js
147
149
// app.js
148
- import ' custom.scss'
150
+ import ' ./ custom.scss'
149
151
```
150
152
151
153
Be sure to ` @import ` or define your custom variable values _ before_ including Bootstrap SCSS
@@ -156,8 +158,31 @@ Place all of the SCSS `@import`s into a **single SCSS file**, and import that si
156
158
project. Importing individual SCSS files into your project will ** not** share variable values and
157
159
functions between files by default.
158
160
159
- ** Note** : Requires webpack configuration to load CSS/SCSS files
160
- ([ official guide] ( https://webpack.js.org/guides/asset-management/#loading-css ) ).
161
+ Webpack and Parcel support prepending the ` scss ` modules with tilde paths (` ~ ` ) when importing from
162
+ a ` scss ` file:
163
+
164
+ ``` scss
165
+ // Webpack example
166
+ @import ' ~bootstrap' ;
167
+ @import ' ~bootstrap-vue' ;
168
+ ```
169
+
170
+ ``` scss
171
+ // Parcel example
172
+ @import ' ~bootstrap/scss/bootstrap' ;
173
+ @import ' ~bootstrap-vue/src/index.scss' ;
174
+ ```
175
+
176
+ For more details how to configure asset loading and how modules are resolved, please consult the
177
+ module bundlers documentation.
178
+
179
+ ** Notes** :
180
+
181
+ - Webpack configuration to load CSS files
182
+ ([ official guide] ( https://webpack.js.org/guides/asset-management/#loading-css ) ).
183
+ - Webpack Loader for SASS/SCSS files ([ official guide] ( https://webpack.js.org/loaders/sass-loader/ ) )
184
+ - Parcel CSS ([ official guide] ( https://parceljs.org/css.html ) )
185
+ - Parcel SCSS ([ official guide] ( https://parceljs.org/scss.html ) )
161
186
162
187
For information on theming Bootstrap, check out the [ Theming] ( /docs/reference/theming ) reference
163
188
section.
0 commit comments