1

Here is my code for setting up history-api-fallback in "webpack.config.js"

    devServer: {
            historyApiFallback:{
                index:'/dist/index.html'
            }
        }

Webpack works find.

When it cannot find path, it will go to index.html then index.html call javascript

 <script type="text/javascript" src="index_bundle.js"></script>

The problem is "index.html" load javascript from the path that call, not go to find .js in the root path.

Example :

  1. http://localhost:8080/a/b/c/

enter image description here

  1. http://localhost:8080/a/b/

enter image description here

  • I posted an answer to this problem here: https://stackoverflow.com/questions/39352703/webpack-historyapifallback-configuration-for-deep-routes – maxfowler Jan 24 '17 at 17:03

0 Answers0