提交 39109427 编写于 作者: Q qiang

Merge branch 'dev' into alpha

......@@ -294,8 +294,8 @@ module.exports = function generateComponent (compilation, jsonpFunction = 'webpa
// fix mp-alipay plugin
if (process.env.UNI_PLATFORM === 'mp-alipay' && appJsonFile) {
const obj = JSON.parse(appJsonFile.source())
if (obj && obj.usingComponents && !Object.keys(obj.usingComponents).length) {
const componentName = 'plugin-wrapper'
const componentName = 'plugin-wrapper'
if (obj && obj.usingComponents && !(componentName in obj.usingComponents)) {
obj.usingComponents[componentName] = `/${componentName}`
const source = JSON.stringify(obj, null, 2)
if (webpack.version[0] > 4) {
......
......@@ -159,7 +159,7 @@ module.exports = function generateJson (compilation) {
})
}
// fix mp-alipay plugin
if (process.env.UNI_PLATFORM === 'mp-alipay') {
if (process.env.UNI_PLATFORM === 'mp-alipay' && name !== 'app.json') {
const usingComponents = jsonObj.usingComponents || {}
if (Object.values(usingComponents).find(value => value.startsWith('plugin://'))) {
const componentName = 'plugin-wrapper'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册