From 14c8635958a7fd828664cb0b36522c6b46a44872 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 16 Sep 2019 20:54:55 +0800 Subject: [PATCH] chore(cli): add warning msg(usingComponents:false) --- packages/vue-cli-plugin-uni/lib/env.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/vue-cli-plugin-uni/lib/env.js b/packages/vue-cli-plugin-uni/lib/env.js index 15768fc374..404a4d8d27 100644 --- a/packages/vue-cli-plugin-uni/lib/env.js +++ b/packages/vue-cli-plugin-uni/lib/env.js @@ -169,7 +169,8 @@ if (process.env.UNI_USING_COMPONENTS) { // 是否启用分包优化 } } } - + +const warningMsg = `uni-app将于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)` // 输出编译器版本等信息 if (process.env.UNI_PLATFORM !== 'h5') { try { @@ -189,14 +190,22 @@ if (process.env.UNI_PLATFORM !== 'h5') { }).length) { console.log(info) console.log(modeText) - + if (!platformOptions.usingComponents) { + console.log(warningMsg) + } console.log('当前nvue编译模式:' + (isNVueCompiler ? 'uni-app' : 'weex') + ' 。编译模式差异见:https://ask.dcloud.net.cn/article/36074') } else { console.log(info + ',' + modeText) + if (!platformOptions.usingComponents) { + console.log(warningMsg) + } } } else { - console.log(modeText) + console.log(modeText) + if (!platformOptions.usingComponents) { + console.log(warningMsg) + } } } catch (e) {} } -- GitLab