1 | const svgToVue = require('svg-to-vue');
|
2 | const { getOptions } = require('loader-utils');
|
3 |
|
4 | module.exports = function (content) {
|
5 | const callback = this.async();
|
6 | const { svgo } = getOptions(this) || {};
|
7 |
|
8 | svgToVue(content, {
|
9 | svgoPath: this.resourcePath,
|
10 | svgoConfig: svgo,
|
11 | })
|
12 | .then(component => callback(null, component))
|
13 | .catch(callback);
|
14 | };
|