How to add default History for back button in PWA?


Pages can be navigated to using deep links or url from anywhere in the app and pwa. This case the back button has no previous page history for the pwa and app.

I want to redirect user to homepage with the back button with no history.

I see Ionic app provides default History feature to do this, but how to do the same for pwa webapp?