Closed
Description
What problem does this feature solve?
I have several components that accepts an image url as property.
To handle this, I have two options:
- use explicit require
<mycomponent :imgsrc="require('./Freepik-awesomecontent.jpg')">
. - add imgsrc attribute to
transformToRequire
for each component I use
It could be convenient to make the tagname optional and specify only an attribute in transformToRequire
What does the proposed API look like?
I propose a empty string for optional tag
transformToRequire: { '':'imgsrc' }
or
a function that tells vue-loader
that the attribute has to be transformed into require
transformToRequire: function(tagName, attributeName) { ...