When I run $ npm run dev ("dev": "webpack-dev-server") it opens localhost:8080/undefined instead of localhost:8080 or at least localhost:8080/index.html
webpack-config.js devServer part:
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
stats: "errors-only",
hot: true,
open: true
If I delete the /undefined part of the URL it works properly even the hot module replacement so it's not a big problem; just want to know why is that happening.
Edit: Im on MacOS
Edit2: Console info when npm run dev:
Project is running at http://localhost:8080/
webpack output is served from /
Content not from webpack is served from /Users/cozarkd/folders/dist
webpack: wait until bundle finished: /undefined
webpack: Compiled successfully.
Ty
output.publicPath? - robertklephttp://localhost:8080/webpack-dev-server/). Which version of Webpack are you using? - robertklepwebpack-dev-server:-( I just updated to 2.5.0 and it's showing the same error. Looks to be a bug: github.com/webpack/webpack-dev-server/issues/960 - robertklep