From 32fa330739051a1e620bf62bbf0a3457fb5d9289 Mon Sep 17 00:00:00 2001 From: Muhammad Ahsan Ayaz Date: Wed, 2 Dec 2020 01:33:57 +0100 Subject: [PATCH] feat(support-ie11): make necessary changes to have the app run on ie11 --- package-lock.json | 12 +++++++++++- package.json | 2 ++ projects/demo/.browserslistrc | 2 +- projects/demo/src/polyfills.ts | 7 +++---- tsconfig.json | 4 ++-- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93b7402..cce3820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5044,6 +5044,11 @@ } } }, + "classlist.js": { + "version": "1.1.20150312", + "resolved": "https://registry.npmjs.org/classlist.js/-/classlist.js-1.1.20150312.tgz", + "integrity": "sha1-HXCEL3Ai8I2awIbOaeWyUPLFd4k=" + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -18024,6 +18029,11 @@ "defaults": "^1.0.3" } }, + "web-animations-js": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/web-animations-js/-/web-animations-js-2.3.2.tgz", + "integrity": "sha512-TOMFWtQdxzjWp8qx4DAraTWTsdhxVSiWa6NkPFSaPtZ1diKUxTn4yTix73A1euG1WbSOMMPcY51cnjTIHrGtDA==" + }, "webdriver-js-extender": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", @@ -19345,4 +19355,4 @@ "integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==" } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 4b6a295..dcd6367 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,13 @@ "@angular/platform-server": "~11.0.2", "@angular/router": "~11.0.2", "@nguniversal/express-engine": "^10.0.2", + "classlist.js": "^1.1.20150312", "conventional-changelog-cli": "^2.1.1", "express": "^4.15.2", "ngx-device-detector": "^2.0.1", "rxjs": "~6.5.5", "tslib": "^2.0.0", + "web-animations-js": "^2.3.2", "zone.js": "~0.10.3" }, "devDependencies": { diff --git a/projects/demo/.browserslistrc b/projects/demo/.browserslistrc index 0ccadaf..d5ef9ab 100644 --- a/projects/demo/.browserslistrc +++ b/projects/demo/.browserslistrc @@ -15,4 +15,4 @@ last 2 Safari major versions last 2 iOS major versions Firefox ESR not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. -not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. +IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/projects/demo/src/polyfills.ts b/projects/demo/src/polyfills.ts index 03711e5..39755f9 100644 --- a/projects/demo/src/polyfills.ts +++ b/projects/demo/src/polyfills.ts @@ -19,14 +19,14 @@ */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. +import 'classlist.js'; // Run `npm install --save classlist.js`. /** * Web Animations `@angular/platform-browser/animations` * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +import 'web-animations-js'; // Run `npm install --save web-animations-js`. /** * By default, zone.js will patch all possible macroTask and DomEvents @@ -55,8 +55,7 @@ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - +import 'zone.js/dist/zone'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/tsconfig.json b/tsconfig.json index ef51c42..d418a29 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "moduleResolution": "node", "importHelpers": true, - "target": "es2015", + "target": "es5", "module": "es2020", "lib": [ "es2018", @@ -22,4 +22,4 @@ ] } } -} \ No newline at end of file +}