You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
361 B

const svgToVue = require('svg-to-vue');
const { getOptions } = require('loader-utils');
module.exports = function (content) {
const callback = this.async();
const { svgo } = getOptions(this) || {};
svgToVue(content, {
svgoPath: this.resourcePath,
svgoConfig: svgo,
})
.then(component => callback(null, component))
.catch(callback);
};