From 2b259e3ef6f04fa16eab920a20ef5dde01639642 Mon Sep 17 00:00:00 2001
From: Bill Erickson <berickxx@gmail.com>
Date: Fri, 1 Nov 2019 12:18:00 -0400
Subject: [PATCH] LP1850955 Angular build targets modernized

Apply a specific set of browsers to guide the Angular / Typescript
compilers toward a more modern set of default browsers.  This reduces
the amount of compilation and browser files required.

Bump the ES version used by Typescript from ES5 to ES6.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Boyer <JBoyer@eoli.info>
---
 Open-ILS/src/eg2/package.json          | 5 +++++
 Open-ILS/src/eg2/src/tsconfig.app.json | 2 --
 Open-ILS/src/eg2/tsconfig.json         | 8 ++++----
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Open-ILS/src/eg2/package.json b/Open-ILS/src/eg2/package.json
index 2bb3143d07..1c49d66eb9 100644
--- a/Open-ILS/src/eg2/package.json
+++ b/Open-ILS/src/eg2/package.json
@@ -13,6 +13,11 @@
     "build-cs-CZ": "ng build --configuration=production-cs-CZ --output-path ../../web/eg2/cs-CZ --deploy-url /eg2/cs-CZ/ --base-href /eg2/cs-CZ; sed -i s/IDL2js\\\"/IDL2js?locale=cs-CZ\\\"/g ../../web/eg2/cs-CZ/index.html; sed -i s/lang=\\\"en\\\"/lang=\\\"cs\\\"/g ../../web/eg2/cs-CZ/index.html"
   },
   "private": true,
+  "browserslist": [
+    "last 3 chrome version",
+    "last 3 firefox version",
+    "last 1 safari version"
+  ],
   "dependencies": {
     "@angular/animations": "^8.2.11",
     "@angular/common": "^8.2.11",
diff --git a/Open-ILS/src/eg2/src/tsconfig.app.json b/Open-ILS/src/eg2/src/tsconfig.app.json
index 39ba8dbacb..190fd300b6 100644
--- a/Open-ILS/src/eg2/src/tsconfig.app.json
+++ b/Open-ILS/src/eg2/src/tsconfig.app.json
@@ -2,8 +2,6 @@
   "extends": "../tsconfig.json",
   "compilerOptions": {
     "outDir": "../out-tsc/app",
-    "baseUrl": "./",
-    "module": "es2015",
     "types": []
   },
   "exclude": [
diff --git a/Open-ILS/src/eg2/tsconfig.json b/Open-ILS/src/eg2/tsconfig.json
index 2e74d318a6..e50f1d4908 100644
--- a/Open-ILS/src/eg2/tsconfig.json
+++ b/Open-ILS/src/eg2/tsconfig.json
@@ -4,10 +4,11 @@
     "outDir": "./dist/out-tsc",
     "sourceMap": true,
     "declaration": false,
+    "module": "es6",
     "moduleResolution": "node",
     "emitDecoratorMetadata": true,
     "experimentalDecorators": true,
-    "target": "es2015",
+    "target": "es6",
     "baseUrl": "src",
     "paths": {
         "@eg/*": ["app/*"],
@@ -17,9 +18,8 @@
       "node_modules/@types"
     ],
     "lib": [
-      "es2017",
-      "dom",
-      "es2018.promise"
+      "es2018",
+      "dom"
     ]
   }
 }
-- 
2.11.0