I faced with problem when I try run build app for IE11. When I run serve with --configuration=es5 - it works. But I build with --configuration=es5 - I take not prod version. How I can build prod version for IE11?
My browserlist has "IE 9-11 # For IE 9-11 support, remove 'not'."
My tsconfig.json has "target": "es5".
My tsconfig-es5.app.json
{
"extends": "./tsconfig.app.json",
"compilerOptions": {
"target": "es5"
}
}
My angular.json
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...
},
"configurations": {
"es5": {
"tsConfig": "tsconfig-es5.app.json"
},
"production": {
"fileReplacements": [{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}],
"optimization": true,
"outputHashing": "none",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "charity:build"
},
"configurations": {
"es5": {
"browserTarget": "charity:build:es5"
},
"production": {
"browserTarget": "charity:build:production"
}
}
},
...
}
I trying add "compilerOptions": { "target": "es5" } for tsconfig.app.json, but I take error message for IE11(Google Chrome works):
ERROR Sys.ParameterCountException: Sys.ParameterCountException: Parameter count mismatch.
Angular 8 build does not work with IE though serve works fine