webpack-dev-server
webpack-dev-server copied to clipboard
image link breaks after updating scss with html-loader
Bug report
When I start the page in the small attached project using webpack-dev-server the page is displayed as expected.. When webpack reloads the project, image links break. Images are loaded by html-loader. Issue is also reported here: https://stackoverflow.com/questions/72498866/webpack-images-disappear-after-css-changes-using-webpack-dev-server
Actual Behavior
When I start the page in the small attached project using webpack-dev-server the page is displayed as expected. When I change something (e.g. a margin in scss), webpack reloads the project, when I refresh the page image links are broken.
Expected Behavior
When I refresh the page images should still be there.
The problem does NOT appear if i first build and then run webpack-dev-server, probably because webpack-dev-server can fallback on the image that is generated in dist. So there is a workaround but it still is annoying.
How Do We Reproduce?
Reproduce (in attached small project) q2.zip
npm i npm start