For two days I tried to solve this problem.
It displays nothing and writes – “You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.”
I am using this code to grab a static PNG, jpg and png image with file-loader, but it still doesn’t work, I lost all hope
module.exports = {
module: {
rules: [
{
test: /.(jpg|PNG|png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
},
],
},
],
},
};
and also
<template>
<img :src="checkUri"/>
</template>
<script>
export default {
props: {
item: {
type: Object,
required: true,
}
},
///
computed: {
checkUri() {
return require('../assets/image/items/' + this.item.img)
}
}
}
</script>
in my component