Reputation: 113
I create on my view a tag img with src; but the image don't show. What is the path? Thanks All Samu
my test.html
<div class="col-md-10">
<img src='img/logo.png'></img>
<h1> TEST
</h1>
</div>4
My structure is:
x:\src\pages\test\test.html
x:\src\pages\test\img\logo.png
webpack.config.js
}, {
// ASSET LOADER
// Reference: https://github.com/webpack/file-loader
// Copy png, jpg, jpeg, gif, svg, woff, woff2, ttf, eot files to output
// Rename the file using the asset hash
// Pass along the updated reference to your code
//
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/,
loader: 'file'
}, {
Upvotes: 1
Views: 304
Reputation: 215
I think it's your html loader.
Try to change it from raw-loader to html-loader :
{
test: /\.html$/,
loader: 'html'
}
https://github.com/webpack/html-loader
Upvotes: 2