In Vue, I'm trying to pass a string into require(), the first option works (passing the string directly). however when passing the variable containing the string the loading fails, any clues???
<template>
<img :src="require('@/assets/channels/email.png')" />
// <img :src="require(test)" />
</template>
export default {
data() {
return {
test: "@/assets/channels/email.png"
};
}
}