提交 26516432 编写于 作者: Q qiang

fix: umd global

上级 6498dcfb
......@@ -28,6 +28,7 @@ function parseRoutes (config) {
}
const GLOBALS = [
'global',
'window',
'document',
'frames',
......@@ -48,7 +49,7 @@ const GLOBALS = [
'print'
]
const globalStatement = GLOBALS.map(g => `${g}:void 0`).join(',')
const globalStatement = GLOBALS.map(g => `${g}:void 0`).join(',')
module.exports = function definePages (appJson) {
const __uniRoutes = parseRoutes(appJson)
......@@ -69,4 +70,4 @@ __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onR
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,${globalStatement}}}}});
`
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册