I am getting the following error when trying to run a prod build using the following
ionic cordova build browser --prod
Getting lot
I have the same issue and this is because tslint 5.0 changed how it checks unused variables.
You can suppress the warnings by changing the rules of the tslint.json file. I changed the "no-unused-variable" from true to false so it will look something like this:
{
"rules": {
"no-duplicate-variable": true,
"no-unused-variable": [
false
]
},
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules"
]
}
Of course this will suppress all warnings about unused variables but at anytime you can revert it to true to see if there are any other unused variables.
You can also add the following variable "noUnusedLocals": true to the tsconfig.json file:
{
"compilerOptions": {
"noUnusedLocals": true,
.
.
.
}
Just know that the "noUnusedLocals": true will throw errors instead of warnings though...
Hope this helps