Skip to content

Commit b70d5ef

Browse files
morkroQingWei-Li
authored andcommitted
Adds usage documentation for Vue CLI 3 (QingWei-Li#50)
Hey, great work here! It took me a while to figure out how to use this with Vue CLI 3 and only discovered the solution in QingWei-Li#47 pretty late. So I thought to just add some documentation :)
1 parent db0be42 commit b70d5ef

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,30 @@ module.exports = {
8282
};
8383
```
8484

85+
### With Vue CLI 3
86+
87+
In your `vue.config.js` file:
88+
89+
```js
90+
module.exports = {
91+
chainWebpack: config => {
92+
config.module.rule('md')
93+
.test(/\.md/)
94+
.use('vue-loader')
95+
.loader('vue-loader')
96+
.end()
97+
.use('vue-markdown-loader')
98+
.loader('vue-markdown-loader/lib/markdown-compiler')
99+
.options({
100+
raw: true
101+
})
102+
}
103+
}
104+
```
105+
85106
## Options
86107

87-
### preventExtract
108+
### `preventExtract`
88109

89110
Since `v2.0.0`, this loader will automatically extract script and style tags from html token content (#26). If you do not need, you can set this option
90111

@@ -98,7 +119,7 @@ Since `v2.0.0`, this loader will automatically extract script and style tags fro
98119
}
99120
```
100121

101-
### wrapper
122+
### `wrapper`
102123

103124
You can customize wrapper tag no matter html element tag or vue component tag. Default is 'section'
104125

@@ -112,7 +133,7 @@ You can customize wrapper tag no matter html element tag or vue component tag. D
112133
}
113134
```
114135

115-
### markdownIt
136+
### `markdownIt`
116137

117138
reference [markdown-it](https://github.com/markdown-it/markdown-it#init-with-presets-and-options)
118139

@@ -144,7 +165,7 @@ reference [markdown-it](https://github.com/markdown-it/markdown-it#init-with-pre
144165
}
145166
```
146167

147-
Or you can customize markdown-it
168+
Or you can customize `markdown-it`
148169

149170
```javascript
150171
var markdown = require('markdown-it')({

0 commit comments

Comments
 (0)