1

I have a single page application that does not use hash URLs I want to use the history API. I am using the middleware historyApiFallback() in browserSync server options. However, this is only working for one level deep URLs:

http://localhost:3000/main correctly resolves to index.html BUT http://localhost:3000/main/a is NOT working. The browser shows "connected to browser sync" and then a blank page is displayed.

Anyone knows what could be the issue here?

Dan
  • 115
  • 1
  • 10

1 Answers1

0

The issue was that the URLs for js and css resources weren't correctly setup. This post helped me fixed the issue: mod_rewrite to index.html breaks relative paths for deep URLs

Community
  • 1
  • 1
Dan
  • 115
  • 1
  • 10