0.0.2 • Published 2 years ago

vue-template-wrapper v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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 }
}
0.0.2

2 years ago

0.0.1

2 years ago