Browser access error after webpack-dev-server running.

the project structure is shown in the following figure

webpack.config.js

 

can be accessed normally, checked a large amount of information, but do not know what went wrong, webpack-dev-server running HTTP server, life or death is a problem. Would you please help me to see what the problem is?


reporting that error is the wrong path. I see if you are missing. /
contentBase: path.join (_ _ dirname,'. / dist')


stupid, devServer.publicPath:'/ 'changed to the default value is normal. I have never understood the meaning of this attribute, which is the access path of URL.

Menu