I have a older angular application where I have implemented okta auth.
It uses angular 7.2, and okta versions
"@okta/okta-angular": "^5.1.0",
"@okta/okta-auth-js": "^5.9.0",
"@okta/okta-signin-widget": "^5.16.1",
"@oktadev/schematics": "^5.2.0",
I'm using "target": "es2015", When I'm compiling the app without the prod flag, everything works. But as soon as I compile with the --prod=true flag it crashes with the following error.
Uncaught TypeError: Super expression must either be null or a function.
If I go into the angular.json file and turn off optimizations, it works:
"optimization": false,
But the application goes from 2mb to 9mb size.
What can I do to get optimizations to work?