I've gone with the standard fix for IE11 issues with Angular 10 apps (not loading fonts, script errors for certain characters in the bundled files) -- by adding a tsconfig-es5.app.json file with a target of es5 and I've added the es5 entry in the configurations object. And the polyfills.ts is importing the classlist.js file. There's nothing I've missed. Here's my package.json file with the build and run scripts I use:
You can see that both the dev:es5 and dev:internal:es5 have configs of es5. Now here's my angular.json file build configuration:
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/{MyContent}/",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "{myEnvDevFile}",
"with": "{myEnvProdFile} }
],
"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"
}
]
},
"es5": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"tsConfig": "./tsconfig-es5.app.json"
}
}
}
Here's my original tsconfig.app.json file:
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
}
And finally the tsconfig-es5.app.json file:
{
"extends": "./tsconfig.app.json",
"compilerOptions": {
"target": "es5"
}
}
I don't think I've missed anything at all. The Angular CLI is 10 so I think I'm good. Have I made a glaring error?
To me, I must missing a polyfill in polyfill.ts but I don't know which one. both zone.js and classlist.js are being imported.