Node version:
v9.2.0
npm version:
5.5.1
Operating system:
Ubuntu 16.04
Command line used:
npm start -s / npm run build
Steps to reproduce:
Please read the description below
Hi,
I have a problem with images. I've created an "images" folder in "src" and added a rather big image file called "cat.jpg". And then in "HomePage.js" I added a simple <img> tag:
<img src="../images/cat.jpg" />
This led to the image being shown in dev mode (npm start -s). But when I build the production version (npm run build), the mentioned image is not shown. After a little digging, it seems to me that even the dev mode is not doing it right since the <img> tag's source reads exactly the same when I inspect it in the browser. If I'm not mistaken, it should have been digested in a way, should it have? I mean I can see the file-loader module mentioned in both "webpack.config.dev.js" and "webpack.config.prod.js" but the tag still points to the plain cat.jpg file on the hard disk!
Is this a bug or I'm doing something wrong?
In any case, it would be nice to include some image in the example project within the repo.
Node version: v9.2.0 npm version: 5.5.1 Operating system: Ubuntu 16.04 Command line used: npm start -s / npm run build Steps to reproduce: Please read the description below
Hi,
I have a problem with images. I've created an "images" folder in "src" and added a rather big image file called "cat.jpg". And then in "HomePage.js" I added a simple
<img>
tag:<img src="../images/cat.jpg" />
This led to the image being shown in dev mode (
npm start -s
). But when I build the production version (npm run build
), the mentioned image is not shown. After a little digging, it seems to me that even the dev mode is not doing it right since the<img>
tag's source reads exactly the same when I inspect it in the browser. If I'm not mistaken, it should have been digested in a way, should it have? I mean I can see thefile-loader
module mentioned in both "webpack.config.dev.js" and "webpack.config.prod.js" but the tag still points to the plain cat.jpg file on the hard disk!Is this a bug or I'm doing something wrong?
In any case, it would be nice to include some image in the example project within the repo.