Skip to content

Commit 845141d

Browse files
tarazenatmorehouse
authored andcommitted
docs: Update images reference section (#1999)
1 parent 8b41913 commit 845141d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/markdown/reference/images/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,35 @@ This will allow you to use the following format in your `.vue` files:
4545

4646
<b-card-img img-src="~/static/picture.jpg" />
4747
```
48+
### Vue CLI 3.0 Support
49+
Vue CLI 3.0 changed the way that webpack compiles a Vue app, in order to make bootstrap-vue work again, you need to do the following steps:
50+
51+
1. Create `vue.config.js` in the root directory (next to `package.json`).
52+
2. Put the following code
53+
```javascript
54+
module.exports = {
55+
chainWebpack: config => {
56+
config.module
57+
.rule('vue')
58+
.use('vue-loader')
59+
.loader('vue-loader')
60+
.tap(options => {
61+
options["transformAssetUrls"] = {
62+
'img': 'src',
63+
'image': 'xlink:href',
64+
'b-img': 'src',
65+
'b-img-lazy': ['src', 'blank-src'],
66+
'b-card': 'img-src',
67+
'b-card-img': 'img-src',
68+
'b-carousel-slide': 'img-src',
69+
'b-embed': 'src'
70+
};
71+
72+
return options;
73+
});
74+
}
75+
}
76+
```
4877

4978
### Configuring `transformAssetUrls` in Nuxt
5079

0 commit comments

Comments
 (0)