Without Prod it works perfectly fine.
It works with ionic serve, ionic cordova run android, ionic cordova run ios
but when i add --prod it give me the following error
Uncaught TypeError: Cannot read property ‘c’ of undefined
at Object.81 (main.js:1)
at e (vendor.js:1)
at Object.435 (main.js:1)
at e (vendor.js:1)
at window.webpackJsonp (vendor.js:1)
at main.js:1
No errors are displayed, and the first page is also not loaded, the error recevied is prior to app load
at Object.81 (main.js:1)
at e (vendor.js:1)
at Object.435 (main.js:1)
at e (vendor.js:1)
at window.webpackJsonp (vendor.js:1)
at main.js:1
when we do ionic serve or build without prod flag, it ignores certain errors or unmet dependencies, but when we build with --prod flag, it throws an error, because the files are not minified and compressed it throws an error on the first line of main.js.
I further debug my code using --aot flag and found that I had written some js wrongly in app.component.ts which was not captured initially while performing ionic serve.
It has been a while i will update once i recollect the exact error