File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
- @import '~@default-theme/styles/config.styl'
2
-
3
1
.home .hero img
4
2
max-height 140px
5
3
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ features:
16
16
17
17
## Installation
18
18
19
- <Tabs >
19
+ <Tabs :options = " { useUrlFragment: false } " >
20
20
<Tab name =" yarn " >
21
21
22
22
``` bash
@@ -35,12 +35,12 @@ npm i -D vue-svg-loader vue-template-compiler
35
35
36
36
## Configuration
37
37
38
- <Tabs >
38
+ <Tabs :options = " { useUrlFragment: false } " >
39
39
<Tab name =" webpack " >
40
40
41
41
::: warning
42
42
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.
44
44
:::
45
45
46
46
``` js
@@ -49,7 +49,7 @@ module.exports = {
49
49
rules: [
50
50
{
51
51
test: / \. svg$ / ,
52
- loader : ' vue-svg-loader' ,
52
+ use : [ ' babel-loader ' , ' vue-svg-loader' ] ,
53
53
},
54
54
],
55
55
},
@@ -69,6 +69,9 @@ module.exports = {
69
69
svgRule .uses .clear ();
70
70
71
71
svgRule
72
+ .use (' babel-loader' )
73
+ .loader (' babel-loader' )
74
+ .end ()
72
75
.use (' vue-svg-loader' )
73
76
.loader (' vue-svg-loader' );
74
77
},
@@ -90,7 +93,7 @@ module.exports = {
90
93
91
94
config .module .rules .push ({
92
95
test: / \. svg$ / ,
93
- loader : ' vue-svg-loader' ,
96
+ use : [ ' babel-loader ' , ' vue-svg-loader' ] ,
94
97
});
95
98
},
96
99
},
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ sidebar: auto
6
6
7
7
## How to use both inline and external SVGs?
8
8
9
- <Tabs >
9
+ <Tabs :options = " { useUrlFragment: false } " >
10
10
<Tab name =" webpack " >
11
11
12
12
``` js
@@ -137,7 +137,7 @@ export {
137
137
## How to prefix ` id ` attributes?
138
138
To avoid the situation where two or more SVGs are using the same ` id ` attribute, you can use the ` prefixIds ` option provided by ` SVGO ` .
139
139
140
- <Tabs >
140
+ <Tabs :options = " { useUrlFragment: false } " >
141
141
<Tab name =" webpack " >
142
142
143
143
``` js
@@ -230,7 +230,7 @@ module.exports = {
230
230
If you want to customize generated IDs, you can pass a function instead of ` true ` to the ` prefixIds ` plugin.
231
231
Here is an example for generating IDs that are prefixed by the file name:
232
232
233
- <Tabs >
233
+ <Tabs :options = " { useUrlFragment: false } " >
234
234
<Tab name =" webpack " >
235
235
236
236
``` js
Original file line number Diff line number Diff line change 11
11
" vue"
12
12
],
13
13
"scripts" : {
14
- "docs:serve " : " vuepress dev docs" ,
14
+ "docs:dev " : " vuepress dev docs" ,
15
15
"docs:build" : " vuepress build docs"
16
16
},
17
17
"bugs" : " https://github.com/visualfanatic/vue-svg-loader/issues" ,
You can’t perform that action at this time.
0 commit comments