Skip to content

Commit 112930f

Browse files
committed
Update docs to use vuepress 1.x
1 parent 1c8dabe commit 112930f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

docs/.vuepress/style.styl renamed to docs/.vuepress/styles/index.styl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '~@default-theme/styles/config.styl'
2-
31
.home .hero img
42
max-height 140px
53

docs/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ features:
1616

1717
## Installation
1818

19-
<Tabs>
19+
<Tabs :options="{ useUrlFragment: false }">
2020
<Tab name="yarn">
2121

2222
``` bash
@@ -35,12 +35,12 @@ npm i -D vue-svg-loader vue-template-compiler
3535

3636
## Configuration
3737

38-
<Tabs>
38+
<Tabs :options="{ useUrlFragment: false }">
3939
<Tab name="webpack">
4040

4141
::: warning
4242
Make sure that your current configuration is not already processing the SVG files.
43-
Check this [FAQ](/faq#how-to-use-both-inline-and-external-svgs) section if you want to use both inline and external SVGs.
43+
Check this [FAQ](/faq.html#how-to-use-both-inline-and-external-svgs) section if you want to use both inline and external SVGs.
4444
:::
4545

4646
``` js
@@ -49,7 +49,7 @@ module.exports = {
4949
rules: [
5050
{
5151
test: /\.svg$/,
52-
loader: 'vue-svg-loader',
52+
use: ['babel-loader', 'vue-svg-loader'],
5353
},
5454
],
5555
},
@@ -69,6 +69,9 @@ module.exports = {
6969
svgRule.uses.clear();
7070

7171
svgRule
72+
.use('babel-loader')
73+
.loader('babel-loader')
74+
.end()
7275
.use('vue-svg-loader')
7376
.loader('vue-svg-loader');
7477
},
@@ -90,7 +93,7 @@ module.exports = {
9093

9194
config.module.rules.push({
9295
test: /\.svg$/,
93-
loader: 'vue-svg-loader',
96+
use: ['babel-loader', 'vue-svg-loader'],
9497
});
9598
},
9699
},

docs/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar: auto
66

77
## How to use both inline and external SVGs?
88

9-
<Tabs>
9+
<Tabs :options="{ useUrlFragment: false }">
1010
<Tab name="webpack">
1111

1212
``` js
@@ -137,7 +137,7 @@ export {
137137
## How to prefix `id` attributes?
138138
To avoid the situation where two or more SVGs are using the same `id` attribute, you can use the `prefixIds` option provided by `SVGO`.
139139

140-
<Tabs>
140+
<Tabs :options="{ useUrlFragment: false }">
141141
<Tab name="webpack">
142142

143143
``` js
@@ -230,7 +230,7 @@ module.exports = {
230230
If you want to customize generated IDs, you can pass a function instead of `true` to the `prefixIds` plugin.
231231
Here is an example for generating IDs that are prefixed by the file name:
232232

233-
<Tabs>
233+
<Tabs :options="{ useUrlFragment: false }">
234234
<Tab name="webpack">
235235

236236
``` js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"vue"
1212
],
1313
"scripts": {
14-
"docs:serve": "vuepress dev docs",
14+
"docs:dev": "vuepress dev docs",
1515
"docs:build": "vuepress build docs"
1616
},
1717
"bugs": "https://github.com/visualfanatic/vue-svg-loader/issues",

0 commit comments

Comments
 (0)