I am using React with Webpack 4 and am developing with the webpack dev server. This works perfectly, however I have one issue.
The dev server creates a file "main.js". The problem arises when I am on the page /edit/1 for example.
historyApiFallback makes sure that I do not get a 404, but that my index.html is server. That works.
The problem is that when I am on /edit/1 the main.js file is not rendered as localhost:8080/main.js, but as localhost:8080/edit/main.js. This file is not rendered by the dev server so it returns a 404.
Is it possible to make main.js have the complete path? Or is there maybe another solution?
Thanks!