historyApiFallback not working
See original GitHub issueHi, thank you very much for this repo. I want to use the plugin for my new svelte spa app.
My config looks like this:
serve({
contentBase: 'dist',
port: 5000,
historyApiFallback: true
}),
But the historyApiFallback
isn’t working. When i go to localhost:5000/solutions/technic
i still get 404 Not Found
and i don’t see the index.html
How can i solve this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
historyApiFallback doesn't work in Webpack dev server
historyApiFallback.index indicate that when url path not match a true file,webpack-dev-server use the file config in historyApiFallback.index to ...
Read more >historyApiFallback troubles with webpack-dev-server and ...
If you are using React Router for your SPA (Single Page App) routing, and are running into a problem where hitting a url...
Read more >historyApiFallback not doing rewrites in webpack 5 #1986
I can't use only one file in index.html in my case because I need 2 'apps' (each with a different path), to be...
Read more >connect-history-api-fallback - npm
Start using connect-history-api-fallback in your project by running `npm i connect-history-api-fallback`. There are 1355 other projects in ...
Read more >Top 5 connect-history-api-fallback Code Examples - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could be interesting to make a repo so we can see what’s going wrong.
Does that mean you removed the leading forward slash? You have to add it, otherwise any request to a nested route like
http://example.com/lorem/ipsum
will try to load your script fromhttp://example.com/lorem/ipsum/dist/main.js
, which is why it fails.There doesn’t seem to be anything wrong in your
rollup.config.js
from what I can tell.