提交 4dad7969 编写于 作者: Q qiang

fix: app-v2 usingComponents fixed #1271

上级 9e7fecc5
...@@ -92,7 +92,7 @@ module.exports = function generateJson (compilation) { ...@@ -92,7 +92,7 @@ module.exports = function generateJson (compilation) {
for (let name of jsonFileMap.keys()) { for (let name of jsonFileMap.keys()) {
const jsonObj = JSON.parse(jsonFileMap.get(name)) const jsonObj = JSON.parse(jsonFileMap.get(name))
if (process.env.UNI_PLATFORM === 'app-plus') { // App平台默认增加usingComponents,激活__wxAppCode__ if (process.env.UNI_PLATFORM === 'app-plus') { // App平台默认增加usingComponents,激活__wxAppCode__
jsonObj.usingComponents = {} jsonObj.usingComponents = jsonObj.usingComponents || {}
} }
// customUsingComponents // customUsingComponents
if (jsonObj.customUsingComponents && Object.keys(jsonObj.customUsingComponents).length) { if (jsonObj.customUsingComponents && Object.keys(jsonObj.customUsingComponents).length) {
...@@ -187,4 +187,4 @@ module.exports = function generateJson (compilation) { ...@@ -187,4 +187,4 @@ module.exports = function generateJson (compilation) {
require('@dcloudio/uni-cli-shared/lib/cache').store() require('@dcloudio/uni-cli-shared/lib/cache').store()
}, 50) }, 50)
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册