From 128a0fa44609ef20d5a16d99a25307ccb34be927 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Wed, 4 Nov 2020 01:01:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(cli):=20=E4=BF=AE=E5=A4=8D=E4=BA=86node=5Fm?= =?UTF-8?q?odules=E7=9A=84=E4=BE=9D=E8=B5=96=E5=8C=85=E6=B2=A1=E8=A2=ABweb?= =?UTF-8?q?pack=E6=89=AB=E8=BF=9B=E5=8E=BB=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit affects: @varlet/cli --- packages/varlet-cli/package.json | 3 ++- packages/varlet-cli/site/pc/main.ts | 1 - .../src/config/webpack.base.config.ts | 20 +++++++++++-------- packages/varlet-eslint-config/package.json | 2 +- packages/varlet-stylelint-config/package.json | 2 +- packages/varlet-ui/package.json | 3 ++- yarn.lock | 5 +++++ 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/varlet-cli/package.json b/packages/varlet-cli/package.json index afe2ffcfd19..9d53f9d11f3 100644 --- a/packages/varlet-cli/package.json +++ b/packages/varlet-cli/package.json @@ -27,7 +27,7 @@ "dev": "tsc --watch", "build": "tsc" }, - "gitHead": "5d0fd4bae88bc6f65335da5cfb944489cca16693", + "gitHead": "c0aed5bc04c05335b66607dbcab6455dafad1de4", "dependencies": { "@babel/core": "^7.12.3", "@babel/plugin-transform-runtime": "^7.12.1", @@ -40,6 +40,7 @@ "chalk": "^4.1.0", "clean-webpack-plugin": "^3.0.0", "commander": "^6.2.0", + "core-js": "^3.6.5", "css-loader": "^5.0.0", "fork-ts-checker-webpack-plugin": "^5.2.1", "fs-extra": "^9.0.1", diff --git a/packages/varlet-cli/site/pc/main.ts b/packages/varlet-cli/site/pc/main.ts index c41066156b0..7a41e3b156e 100644 --- a/packages/varlet-cli/site/pc/main.ts +++ b/packages/varlet-cli/site/pc/main.ts @@ -3,4 +3,3 @@ import App from './App.vue' const app = createApp(App as any) app.mount('#app') - diff --git a/packages/varlet-cli/src/config/webpack.base.config.ts b/packages/varlet-cli/src/config/webpack.base.config.ts index 0c902d47eb3..f47929d10b2 100644 --- a/packages/varlet-cli/src/config/webpack.base.config.ts +++ b/packages/varlet-cli/src/config/webpack.base.config.ts @@ -45,11 +45,18 @@ export function createBabelConfig() { return { loader: 'babel-loader', options: { - presets: ['@babel/preset-env'], - plugins: ['@babel/plugin-transform-runtime'], - targets: { - "ie": "11" - } + presets: [ + [ + '@babel/preset-env', + { + targets: { + chrome: "58", + ie: "11" + } + } + ] + ], + plugins: ['@babel/plugin-transform-runtime'] } } } @@ -98,7 +105,6 @@ export function createBaseConfig() { { test: /\.vue$/, use: ['cache-loader', 'vue-loader'], - exclude: /node_modules/ }, { test: /\.js$/, @@ -106,7 +112,6 @@ export function createBaseConfig() { 'cache-loader', createBabelConfig() ], - exclude: /node_modules/ }, { test: /\.ts$/, @@ -118,7 +123,6 @@ export function createBaseConfig() { options: { appendTsSuffixTo: [/\.vue$/] } } ], - exclude: /node_modules/ }, { test: /\.(png|jpg|gif|jpeg|svg)$/, diff --git a/packages/varlet-eslint-config/package.json b/packages/varlet-eslint-config/package.json index edd6c20cd26..7382c47d022 100644 --- a/packages/varlet-eslint-config/package.json +++ b/packages/varlet-eslint-config/package.json @@ -26,7 +26,7 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-vue": "^7.1.0" }, - "gitHead": "5d0fd4bae88bc6f65335da5cfb944489cca16693", + "gitHead": "c0aed5bc04c05335b66607dbcab6455dafad1de4", "peerDependencies": { "eslint": "^7.12.1" } diff --git a/packages/varlet-stylelint-config/package.json b/packages/varlet-stylelint-config/package.json index 1901b70f05b..71bc44a5f6b 100644 --- a/packages/varlet-stylelint-config/package.json +++ b/packages/varlet-stylelint-config/package.json @@ -17,7 +17,7 @@ "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^20.0.0" }, - "gitHead": "5d0fd4bae88bc6f65335da5cfb944489cca16693", + "gitHead": "c0aed5bc04c05335b66607dbcab6455dafad1de4", "peerDependencies": { "stylelint": "^13.7.2" } diff --git a/packages/varlet-ui/package.json b/packages/varlet-ui/package.json index 2415a1723e6..2522d5838af 100644 --- a/packages/varlet-ui/package.json +++ b/packages/varlet-ui/package.json @@ -20,5 +20,6 @@ }, "bugs": { "url": "https://github.com/haoziqaq/varlet/issues" - } + }, + "gitHead": "c0aed5bc04c05335b66607dbcab6455dafad1de4" } diff --git a/yarn.lock b/yarn.lock index 0e00fcc8dd8..2a44d444b7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3938,6 +3938,11 @@ core-js@^3.6.1: resolved "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== +core-js@^3.6.5: + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"