I'm trying to build a project for production using ng build --prod
. Everything goes OK on the build, but when I try to open it on the browser it takes some time in a main-es2015 bundle parsing and returns me the following error:
ERROR in Maximum call stack size exceeded
I tried to debug via error stack trace but didn't get any luck on this.
I think that may have an infinite loop over my code, but don't know where. I'm using lazy-loaded routes and Material Angular. At first I thought about possible circular dependencies and I've unified only one of these dependencies among the modules (MatButtonModule) in order to test and it didn't worked (the MatButtonComponent wasn't being parsed).
Someone could help me to understand what may happened here?