From bcaa09e4bf32f468a088db2a415e1126e520bcfb Mon Sep 17 00:00:00 2001 From: IsmeOvo <1219353840@qq.com> Date: Wed, 23 Dec 2020 20:24:40 +0800 Subject: [PATCH] =?UTF-8?q?perf:initExtends=E6=9D=A1=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-cli-shared/lib/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/uni-cli-shared/lib/plugin.js b/packages/uni-cli-shared/lib/plugin.js index ae79a8daa4..8ceac598d2 100644 --- a/packages/uni-cli-shared/lib/plugin.js +++ b/packages/uni-cli-shared/lib/plugin.js @@ -74,11 +74,11 @@ function initExtends (name, plugin, plugins) { console.error('目前仅支持基于 h5 平台做扩展') process.exit(0) } - const extendsPlugin = plugins.find(plugin => plugin.name === extendsPlatform) if (!plugin) { console.error(`缺少平台 ${extendsPlatform} 插件`) process.exit(0) - } + } + const extendsPlugin = plugins.find(plugin => plugin.name === extendsPlatform) process.env.UNI_SUB_PLATFORM = name process.env.UNI_PLATFORM = extendsPlatform initPlugin(extendsPlugin) -- GitLab