When using file-loader and html-loader in webpack the src attr of image is '[object Module]'
Try adding esModule: false
option to file-loader like so:
...
{
test: /\.(jpeg|jpg|png)$/,
use: [
loader: 'file-loader',
options: {
esModule: false
}
]
}
...
Same applies to url-loader.
esModule option has been introduced in file-loader in version 4.3.0 and in 5.0.0 it has been set to true by default which can be a breaking change.
Sources:
- file-loader release history
- relevant github issue