We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff84278 commit 155aba3Copy full SHA for 155aba3
index.js
@@ -1,11 +1,13 @@
1
var svg = require('svgo');
2
+var loaderUtils = require('loader-utils');
3
var compiler = require('vue-template-compiler');
4
-var svgo = new svg({
5
- plugins: ['removeDoctype', 'removeComments'],
6
-});
7
-
8
module.exports = function (content) {
+ var options = loaderUtils.getOptions(this);
+ var svgo = new svg({
+ plugins: options.svgo || ['removeDoctype', 'removeComments'],
9
+ });
10
+
11
this.cacheable && this.cacheable(true);
12
this.addDependency(this.resourcePath);
13
package.json
@@ -18,6 +18,7 @@
18
"vue-template-compiler": "^2.0.0"
19
},
20
"dependencies": {
21
+ "loader-utils": "^1.1.0",
22
"svgo": "^0.7.2"
23
}
24
0 commit comments