Skip to content

Commit 302acb0

Browse files
committed
(docs) add vue 3 installation steps
1 parent 04ff2e3 commit 302acb0

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
![Demo Image](demo/src/assets/web_mobile.png)
1212

13+
## [Vue 3 compatibility 🚀](#use-in-a-vue-3-project)
14+
1315
## Features
1416

1517
- Vue, Angular & React compatibility
@@ -827,6 +829,51 @@ yarn add --save vue
827829

828830
<br>
829831

832+
## Use in a Vue 3 project
833+
834+
### Install vue-advance-chat component
835+
836+
```bash
837+
# Using npm
838+
npm install --save https://github.com/antoine92190/vue-advanced-chat/tarball/next
839+
```
840+
841+
### Install vue migration build
842+
843+
```bash
844+
# Using npm
845+
npm install --save-dev @vue/compat
846+
```
847+
848+
### Add migration build config
849+
850+
```javascript
851+
// vue.config.js
852+
853+
module.exports = {
854+
...
855+
chainWebpack: config => {
856+
config.resolve.alias.set('vue', '@vue/compat')
857+
858+
config.module
859+
.rule('vue')
860+
.use('vue-loader')
861+
.tap(options => {
862+
return {
863+
...options,
864+
compilerOptions: {
865+
compatConfig: {
866+
MODE: 3
867+
}
868+
}
869+
}
870+
})
871+
}
872+
}
873+
```
874+
875+
<br>
876+
830877
## [Contributing](https://github.com/antoine92190/vue-advanced-chat/blob/master/.github/CONTRIBUTING.md)
831878

832879
Your help is always appreciated :rocket:

0 commit comments

Comments
 (0)