I am currently working on an older angular application that has been integrated with Okta authentication.
The application is built using 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",
The app is set to use "target": "es2015". Compiling the app without the prod flag works fine, but enabling --prod=true flag leads to a crash with the error message:
Uncaught TypeError: Super expression must either be null or a function.
Toggling off optimizations in the angular.json file resolves the issue:
"optimization": false,
However, this results in a significant increase in the application size from 2mb to 9mb. Are there any alternative solutions to enable optimizations without facing this error?