-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hard to configure the index html path to be relative to the publicPath #4231
Comments
Set |
setting |
I recommend do not have |
Run into the exact same problem. Seems like quite a heavy hack for such a simple use case. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modification Proposal
Expected Behavior / Situation
It is quite common to need to have webpack bundle an app such that the index.html is in the parent directory which contains a subdirectory for the rest of the assets, such as the following directory structure:
/index.html
/static/app-bundle.js
/static/app-bundle.css
The
webpack.config.js
for the above looks like this:This works fine for production builds, but in development mode, webpack-dev-server fails to find the
index.html
file and all requests to the server result in404
responses.Actual Behavior / Situation
After much experimentation, I was able to modify the
webpack.config.js
to get theindex.html
serving properly like this:It would be really nice if
historyApiFallback: true
did the logical thing for this case, without requiring the following workaround:Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: