I have upgraded my application to Angular 16 and upgrade went well and application is working as expected
But when I run the command for prod build
ng build --configuration=production
I got this error
Index html generation failed.
document.documentElement.setAttribute is not a function
I am not sure how to fix this as I don't have documentElement.setAttribute in my code
Setting optimization and buildOptimizer to false in angular.json does work but I know this is not right way to fix
any help or suggestion would be appreciated