After trying to migrate form Angular 9 to 13, ng build –configuration production is not creating the polyfills-es5.js file which I need for IE 11.
I tried below things
Updated tsconfig.json file to target to es5
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"module": "es2020",
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
Updated polyfills.ts files
* BROWSER POLYFILLS
*/
import 'core-js';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
I also read somewhere to update the browserslist file, but I am not able to find browserslist file in my project folder.