From f572f4230a740d689ae0f10378521f4bd8a9a81e Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Fri, 29 Mar 2019 15:47:30 +1100 Subject: [PATCH] chore(skeleton): remove core-js as the import is too late for IE11 Because src/main is executed after aurelia-bootstrapper. Promise has to be polyfilled before aurelia-bootstrapper. --- lib/dependencies.json | 1 - skeleton/common/package.json | 1 - skeleton/plugin/dev-app/main.ext | 3 ++- skeleton/scaffold-minimum/src/main.ext | 3 ++- skeleton/scaffold-navigation/src/main.ext | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/dependencies.json b/lib/dependencies.json index 2dfd4c56e..7ed0d4442 100644 --- a/lib/dependencies.json +++ b/lib/dependencies.json @@ -29,7 +29,6 @@ "clean-webpack-plugin": "^1.0.1", "connect-history-api-fallback": "^1.6.0", "copy-webpack-plugin": "^5.0.0", - "core-js": "^3.0.0", "cross-env": "^5.2.0", "cssnano": "^4.1.10", "css-loader": "^1.0.0", diff --git a/skeleton/common/package.json b/skeleton/common/package.json index b99ba72ed..a40606ff4 100644 --- a/skeleton/common/package.json +++ b/skeleton/common/package.json @@ -21,7 +21,6 @@ "aurelia-cli": "", "aurelia-testing": "", "aurelia-tools": "", - "core-js": "", "gulp": "", "minimatch": "", "through2": "", diff --git a/skeleton/plugin/dev-app/main.ext b/skeleton/plugin/dev-app/main.ext index 73dae5e32..dfc680e33 100644 --- a/skeleton/plugin/dev-app/main.ext +++ b/skeleton/plugin/dev-app/main.ext @@ -1,5 +1,6 @@ -import 'core-js/stable'; // @if feat.babel +// regenerator-runtime is to support async/await syntax in ESNext. +// If you don't use async/await, you can remove regenerator-runtime. import 'regenerator-runtime/runtime'; // @endif // @if feat.typescript diff --git a/skeleton/scaffold-minimum/src/main.ext b/skeleton/scaffold-minimum/src/main.ext index 19380872c..7ce184a19 100644 --- a/skeleton/scaffold-minimum/src/main.ext +++ b/skeleton/scaffold-minimum/src/main.ext @@ -1,5 +1,6 @@ -import 'core-js/stable'; // @if feat.babel +// regenerator-runtime is to support async/await syntax in ESNext. +// If you don't use async/await, you can remove regenerator-runtime. import 'regenerator-runtime/runtime'; // @endif // @if feat.typescript diff --git a/skeleton/scaffold-navigation/src/main.ext b/skeleton/scaffold-navigation/src/main.ext index e4dbe5148..7d27096d7 100644 --- a/skeleton/scaffold-navigation/src/main.ext +++ b/skeleton/scaffold-navigation/src/main.ext @@ -1,5 +1,6 @@ -import 'core-js/stable'; // @if feat.babel +// regenerator-runtime is to support async/await syntax in ESNext. +// If you don't use async/await, you can remove regenerator-runtime. import 'regenerator-runtime/runtime'; // @endif import 'bootstrap';