From a1e1bb7b04bfa8e9e707987e56ee9c15edf384f7 Mon Sep 17 00:00:00 2001 From: qlin Date: Wed, 28 Dec 2022 16:39:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20core-js=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E9=97=AE=E9=A2=98=20(#165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/create-fes-app/templates/app/h5/package.json | 2 +- packages/create-fes-app/templates/app/pc/package.json | 2 +- packages/fes-preset-built-in/package.json | 6 +++--- .../src/plugins/commands/webpackConfig/getBabelOpts.js | 2 +- yarn.lock | 7 ++++++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/create-fes-app/templates/app/h5/package.json b/packages/create-fes-app/templates/app/h5/package.json index cd35db5c..2427516c 100644 --- a/packages/create-fes-app/templates/app/h5/package.json +++ b/packages/create-fes-app/templates/app/h5/package.json @@ -48,7 +48,7 @@ "@fesjs/plugin-icon": "^2.0.0", "@fesjs/plugin-request": "^2.0.0", "vue": "^3.2.37", - "core-js": "^3.8.3" + "core-js": "^3.27.0" }, "private": true } \ No newline at end of file diff --git a/packages/create-fes-app/templates/app/pc/package.json b/packages/create-fes-app/templates/app/pc/package.json index 48b6276b..d526bce9 100644 --- a/packages/create-fes-app/templates/app/pc/package.json +++ b/packages/create-fes-app/templates/app/pc/package.json @@ -53,7 +53,7 @@ "@fesjs/plugin-enums": "^2.0.0", "@fesjs/fes-design": "^0.5.0", "vue": "^3.2.37", - "core-js": "^3.8.3" + "core-js": "^3.27.0" }, "private": true } \ No newline at end of file diff --git a/packages/fes-preset-built-in/package.json b/packages/fes-preset-built-in/package.json index 70e0667a..0ab33a78 100644 --- a/packages/fes-preset-built-in/package.json +++ b/packages/fes-preset-built-in/package.json @@ -47,7 +47,7 @@ "connect-history-api-fallback": "^1.6.0", "cookie-parser": "^1.4.5", "copy-webpack-plugin": "^10.2.4", - "core-js": "^3.8.3", + "core-js": "^3.27.0", "css-loader": "^5.0.1", "css-minimizer-webpack-plugin": "^3.0.0", "envinfo": "^7.7.3", @@ -74,6 +74,6 @@ "webpackbar": "^5.0.0-3" }, "peerDependencies": { - "core-js": "^3.8.3" + "core-js": "^3.27.0" } -} +} \ No newline at end of file diff --git a/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/getBabelOpts.js b/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/getBabelOpts.js index f49583c8..78513c4a 100644 --- a/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/getBabelOpts.js +++ b/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/getBabelOpts.js @@ -15,7 +15,7 @@ function getBabelOpts({ targets, useBuiltIns: 'usage', corejs: { - version: 3, + version: require('core-js/package.json').version, proposals: true }, modules: false diff --git a/yarn.lock b/yarn.lock index 1fec4f7e..413b0926 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5255,7 +5255,12 @@ core-js-compat@^3.25.1: dependencies: browserslist "^4.21.4" -core-js@^3.6.1, core-js@^3.8.3: +core-js@^3.27.0: + version "3.27.0" + resolved "https://registry.npmmirror.com/core-js/-/core-js-3.27.0.tgz#a343bc614f29d9dcffa7616e65e10f9001cdd332" + integrity sha512-wY6cKosevs430KRkHUIsvepDXHGjlXOZO3hYXNyqpD6JvB0X28aXyv0t1Y1vZMwE7SoKmtfa6IASHCPN52FwBQ== + +core-js@^3.6.1: version "3.25.3" resolved "https://registry.npmmirror.com/core-js/-/core-js-3.25.3.tgz#cbc2be50b5ddfa7981837bd8c41639f27b166593" integrity sha512-y1hvKXmPHvm5B7w4ln1S4uc9eV/O5+iFExSRUimnvIph11uaizFR8LFMdONN8hG3P2pipUfX4Y/fR8rAEtcHcQ==