How to get Webpack Dev Server to display images stored locally?
Your webpack configuration doesn't declare explicitly output.publicPath
setting. A basic configuration might be like:
output: {
publicPath: '/',
path: __dirname + "/dist",
filename: "[name].js"
},
Further consideration: since your logo.jpg
lives in the same directory as your component, why not importing it with a ./
relative path?
import Logo from "./logo.jpg";