From 825e376777a31767c996d12436b4e0d19e00b44b Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 5 Sep 2018 23:27:02 +0800 Subject: [PATCH] Drop support for IE --- .babelrc | 1 + .browserslistrc | 3 +-- package.json | 4 +--- resources/assets/src/js/polyfill.js | 16 ---------------- webpack.config.js | 1 - yarn.lock | 8 -------- 6 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 resources/assets/src/js/polyfill.js diff --git a/.babelrc b/.babelrc index 79d2b9e4..b5889ccd 100644 --- a/.babelrc +++ b/.babelrc @@ -8,6 +8,7 @@ ], "plugins": [ "@babel/syntax-dynamic-import", + "@babel/plugin-transform-async-to-generator", ["@babel/plugin-transform-runtime", { "helpers": true, "regenerator": true diff --git a/.browserslistrc b/.browserslistrc index 214388fe..53eba312 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -1,3 +1,2 @@ > 1% -last 2 versions -not dead +not ie 11 diff --git a/package.json b/package.json index 62973822..0c8349da 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "admin-lte": "^2.4.2", "bootstrap": "^3.3.7", "chart.js": "^2.7.1", - "es6-promise": "^4.2.4", "icheck": "^1.0.2", "jquery": "^3.3.1", "skinview3d": "^1.1.0", @@ -36,8 +35,7 @@ "vue": "^2.5.16", "vue-good-table": "^2.12.2", "vue-upload-component": "^2.8.11", - "vuejs-paginate": "^2.0.1", - "whatwg-fetch": "^2.0.4" + "vuejs-paginate": "^2.0.1" }, "devDependencies": { "@babel/core": "^7.0.0", diff --git a/resources/assets/src/js/polyfill.js b/resources/assets/src/js/polyfill.js deleted file mode 100644 index 740d8f10..00000000 --- a/resources/assets/src/js/polyfill.js +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable no-var */ -import 'core-js/fn/array/includes'; -import 'core-js/fn/array/find'; -import 'core-js/fn/object/assign'; -import 'core-js/fn/object/values'; -import 'core-js/fn/string/starts-with'; -import 'es6-promise/auto'; -import 'whatwg-fetch'; - -Number.parseInt = parseInt; - -document.body.classList.replace = function (oldToken, newToken) { - var list = document.body.classList; - list.remove(oldToken); - list.add(newToken); -}; diff --git a/webpack.config.js b/webpack.config.js index 79bf60eb..591bee20 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,6 @@ const config = { mode: devMode ? 'development' : 'production', entry: { index: './resources/assets/src/index.js', - polyfill: './resources/assets/src/js/polyfill.js', style: [ 'bootstrap/dist/css/bootstrap.min.css', 'admin-lte/dist/css/AdminLTE.min.css', diff --git a/yarn.lock b/yarn.lock index 64d250c6..05d6b7ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3224,10 +3224,6 @@ es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-promise@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" @@ -9019,10 +9015,6 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: dependencies: iconv-lite "0.4.19" -whatwg-fetch@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4"