1

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.

ChainList
  • 1,198
  • 7
  • 28

2 Answers2

1

I face this issue two times it could help you.

1st scenario There is a recursive function with the wrong base case

Second scenario is accidentally import same file two times

Indrakumara
  • 1,595
  • 17
  • 22
-1

Not a solution but a workaround.

Compile your project with --aot=false and --buildOptimizer=false.

user1044169
  • 2,686
  • 6
  • 35
  • 64