0.0.2 • Published 2 years ago
vue-template-wrapper v0.0.2
vue-template-wrapper
Wraps source in <template />
module.exports = function (source) {
return `<template>${source}</template>`
}
Using with webpack
webpack.config.js
rules: [
{
test: /\.svg$/,
use: ['vue-loader', 'vue-template-wrapper']
}
]
You can now import SVG as a Vue component.
import icon from './icon.svg'
export default {
components: { icon }
}