Stefan R. Stefan R. - 5 months ago 36
Javascript Question

webpack-dev-server renders all js files, but throws 404 on load

My environment was working perfectly, but suddenly this behaviour appeared.

The page includes some scripts 'images.js' 'polyfill.js' 'vendor.js'

When running the webpack server, everything starts nicely (green 'rendered' messages). But when opening the page (index.html is available), on loading the referenced scripts, I just get 404 in the output window.

It seems to me that there were build errors on server startup, but there is no error output. Is there any way to look 'deeper' into what the server makes on startup?


Thanks to the guys on Github, I could solve it finally. Turned out that there is a difference in the behaviour running the webpack server on Windows 10 (where everything works for my collegues) and Windows Server 2008 (which I am using). Setting the 'publicPath' in the webserver config to http://localhost:3000/ solved it.