提交 bcaa09e4 编写于 作者: I IsmeOvo

perf:initExtends条件优化

上级 e37114b6
...@@ -74,11 +74,11 @@ function initExtends (name, plugin, plugins) { ...@@ -74,11 +74,11 @@ function initExtends (name, plugin, plugins) {
console.error('目前仅支持基于 h5 平台做扩展') console.error('目前仅支持基于 h5 平台做扩展')
process.exit(0) process.exit(0)
} }
const extendsPlugin = plugins.find(plugin => plugin.name === extendsPlatform)
if (!plugin) { if (!plugin) {
console.error(`缺少平台 ${extendsPlatform} 插件`) console.error(`缺少平台 ${extendsPlatform} 插件`)
process.exit(0) process.exit(0)
} }
const extendsPlugin = plugins.find(plugin => plugin.name === extendsPlatform)
process.env.UNI_SUB_PLATFORM = name process.env.UNI_SUB_PLATFORM = name
process.env.UNI_PLATFORM = extendsPlatform process.env.UNI_PLATFORM = extendsPlatform
initPlugin(extendsPlugin) initPlugin(extendsPlugin)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册