提交 20486eec 编写于 作者: fxy060608's avatar fxy060608

feat(cli): set default value for usingComponents to true

上级 54638ee3
...@@ -29,7 +29,7 @@ process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui'] ...@@ -29,7 +29,7 @@ process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
const { const {
isSupportSubPackages, isSupportSubPackages,
runByHBuilderX, runByHBuilderX,
isInHBuilderXAlpha, // isInHBuilderXAlpha,
getPagesJson, getPagesJson,
getManifestJson getManifestJson
} = require('@dcloudio/uni-cli-shared') } = require('@dcloudio/uni-cli-shared')
...@@ -65,12 +65,12 @@ process.UNI_STAT_CONFIG = { ...@@ -65,12 +65,12 @@ process.UNI_STAT_CONFIG = {
appid: manifestJsonObj.appid appid: manifestJsonObj.appid
} }
// fixed by hxy alpha 版默认启用新的框架 // 默认启用 自定义组件模式
if (isInHBuilderXAlpha) { // if (isInHBuilderXAlpha) {
if (!platformOptions.hasOwnProperty('usingComponents')) { if (!platformOptions.hasOwnProperty('usingComponents')) {
platformOptions.usingComponents = true platformOptions.usingComponents = true
}
} }
// }
if (process.env.UNI_PLATFORM === 'h5') { if (process.env.UNI_PLATFORM === 'h5') {
const optimization = platformOptions.optimization const optimization = platformOptions.optimization
...@@ -169,7 +169,7 @@ if (process.env.UNI_USING_COMPONENTS) { // 是否启用分包优化 ...@@ -169,7 +169,7 @@ if (process.env.UNI_USING_COMPONENTS) { // 是否启用分包优化
} }
} }
} }
const warningMsg = `uni-app将于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)` const warningMsg = `uni-app将于2019年11月1日起停止支持非自定义组件模式 [详情](https://ask.dcloud.net.cn/article/36385)`
// 输出编译器版本等信息 // 输出编译器版本等信息
if (process.env.UNI_PLATFORM !== 'h5') { if (process.env.UNI_PLATFORM !== 'h5') {
...@@ -197,14 +197,14 @@ if (process.env.UNI_PLATFORM !== 'h5') { ...@@ -197,14 +197,14 @@ if (process.env.UNI_PLATFORM !== 'h5') {
' 。编译模式差异见:https://ask.dcloud.net.cn/article/36074') ' 。编译模式差异见:https://ask.dcloud.net.cn/article/36074')
} else { } else {
console.log(info + '' + modeText) console.log(info + '' + modeText)
if (!platformOptions.usingComponents) { if (!platformOptions.usingComponents) {
console.log(warningMsg) console.log(warningMsg)
} }
} }
} else { } else {
console.log(modeText) console.log(modeText)
if (!platformOptions.usingComponents) { if (!platformOptions.usingComponents) {
console.log(warningMsg) console.log(warningMsg)
} }
} }
} catch (e) {} } catch (e) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册