Using webpack for the first time. Can't load images in there. Tried a LOT of things to fix it, but... I included my images in html through img src. I also did import in index.js:
import backGround from '../img/bg.jpg';
const bgImg = document.getElementById('bg');
bgImg.src = backGround;
So I got this kind of error: ERROR in ./src/img/bg.jpg 1:0 Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type
I can also show you my config:
{
test: /\.(png|svg|jpg|gif)$/,
use: [
'file-loader'
],
},