diff --git a/index.js b/index.js index 26f3541..61ac0ee 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,14 @@ module.exports = function (content) { svg .optimize(content, { path }) .then((result) => { - const compiled = compiler.compile(result.data, { + let template = result.data; + + // https://github.com/vuejs/vue-loader/issues/1014 + if (options.functional) { + template = template.replace(/]+)>/, ``); + } + + const compiled = compiler.compile(template, { preserveWhitespace: false, });