In development mode everything working but when i'm running my angular 6 app in production mode where it's generating deploying files as shown in the screen shot.
It's throwing error shown below and can also bee seen in the screen shot above. The generated main script is trying to return new t
where t is not a constructor.
main.8a1f9e821b7c8c76e49b.js:1 Uncaught TypeError: t is not a constructor
at main.8a1f9e821b7c8c76e49b.js:1
at Ao (main.8a1f9e821b7c8c76e49b.js:1)
at main.8a1f9e821b7c8c76e49b.js:1
at new e (main.8a1f9e821b7c8c76e49b.js:1)
at Object.Xo [as createNgModuleRef] (main.8a1f9e821b7c8c76e49b.js:1)
at t.create (main.8a1f9e821b7c8c76e49b.js:1)
at main.8a1f9e821b7c8c76e49b.js:1
at e.invoke (polyfills.b134ad1096bf06acde05.js:1)
at Object.onInvoke (main.8a1f9e821b7c8c76e49b.js:1)
at e.invoke (polyfills.b134ad1096bf06acde05.js:1)
I have commented all the switch statements in my application. Still I'm not able to find out/debug from where it's throwing this exception. Can anyone suggest me how I can fix/debug this problem.? Please let me know if any other inputs required.