I am facing a weird issue and wonder if some of you faced the same issue as well. We are actually working on a custom elements library made with @angular7 and @angular/elements using this tutorial: https://medium.com/@aks1357/getting-started-with-angular-elements-d13a967b03df
The thing is, it is working really great when running ng serve
but as soon as we build the app using our library with ng build --prod
we start getting errors either about a regex or a maximum stack call size exceeded.
I found the issue is about the optimization flag set to true in production mode. But I don't see why minifying the code, breaks the thing.
Does any of you ran into this issue before?
Unfortunately I cannot share the code because, hello NDA.