提交 4a7b3909 编写于 作者: 石小磊 提交者: 折腾笔记

update: 兼容引擎侧分包

上级 15316102
...@@ -11,6 +11,7 @@ module.exports = { ...@@ -11,6 +11,7 @@ module.exports = {
style: '.jxss', style: '.jxss',
template: '.jxml' template: '.jxml'
}, },
subPackages: false,
project: 'project.config.json' project: 'project.config.json'
}, },
copyWebpackOptions (platformOptions, vueOptions) { copyWebpackOptions (platformOptions, vueOptions) {
......
...@@ -3,5 +3,9 @@ module.exports = function (pagesJson, manifestJson) { ...@@ -3,5 +3,9 @@ module.exports = function (pagesJson, manifestJson) {
app, app,
project project
} = require('../mp')(pagesJson, manifestJson, require('./project.config.json')) } = require('../mp')(pagesJson, manifestJson, require('./project.config.json'))
//暂不支持分包,兼容引擎判断
if(app.content.subPackages && !app.content.subPackages.length){
delete app.content.subPackages;
}
return [app, project] return [app, project]
} }
...@@ -4,14 +4,20 @@ import previewImage from '../../../mp-weixin/helpers/normalize-preview-image' ...@@ -4,14 +4,20 @@ import previewImage from '../../../mp-weixin/helpers/normalize-preview-image'
import getSystemInfo from '../../../mp-weixin/helpers/system-info' import getSystemInfo from '../../../mp-weixin/helpers/system-info'
import getUserProfile from '../../../mp-weixin/helpers/get-user-profile' import getUserProfile from '../../../mp-weixin/helpers/get-user-profile'
// 需要做转换的 API 列表
export const protocols = { export const protocols = {
navigateTo, // navigateTo,
redirectTo, // redirectTo,
previewImage, // previewImage,
getSystemInfo, // getSystemInfo,
getSystemInfoSync: getSystemInfo, // getSystemInfoSync: getSystemInfo,
getUserProfile // getUserProfile
} }
// 不支持的 API 列表
export const todos = [ export const todos = [
'getSelectedTextRange'
] ]
// 存在兼容性的 API 列表
export const canIUses = [] export const canIUses = []
export default { export default {
oauth: ['jd'], oauth: ['jd'],
share: ['jd'], share: ['jd'],
payment: [''], payment: ['jd'],
push: [''] push: ['jd']
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册