<template>
<div>
<SvgView/>
</div>
</template>
<script>
export default{
props:{
name:{
type: String,
required: true
}
},
сomponents:{
SvgView:require(`./${this.name}.svg`)
}
}
</script>
Uncaught Error: Cannot find module './undefined.svg'
at webpackContextResolve (eval at ./src/components/Icons sync recursive ^\.\/.*\.svg$ (app.js:1945), <anonymous>:13:11)
at webpackContext (eval at ./src/components/Icons sync recursive ^\.\/.*\.svg$ (app.js:1945), <anonymous>:8:11)
at eval (SvgViewer.vue?af9c:16)
at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/Icons/SvgViewer.vue?vue&type=script&lang=js& (app.js:974)
at __webpack_require__ (app.js:849)
at fn (app.js:151)
at eval (SvgViewer.vue?d90c:1)
at Module../src/components/Icons/SvgViewer.vue?vue&type=script&lang=js& (app.js:2017)
at __webpack_require__ (app.js:849)
at fn (app.js:151)