After building an angular application, I encountered a strange issue where it runs smoothly in non-production mode but throws an error when running with --prod
:
Uncaught TypeError: this._platformLocation.onPopState is not a function
I have double-checked the LocationStrategy implementation and ensured that all dependencies are up-to-date according to the latest Angular version. Despite this bug being supposedly fixed already, the error persists.
// Dependencies
...
// DevDependencies
...
Any insights on why this error occurs exclusively during production builds would be greatly appreciated. Thank you!