提交 cb86e93e 编写于 作者: Q qiang

fix: 支持配置 nvue 首页启动模式

上级 d66249e0
......@@ -86,6 +86,12 @@ module.exports = function (content) {
let appConfigContent = ''
jsonFiles.forEach(jsonFile => {
if (jsonFile) {
if (!isAppView && jsonFile.name === 'manifest.json') {
const content = JSON.parse(jsonFile.content)
if (!content.launch_path && content.plus['uni-app'].nvueLaunchMode === 'fast') {
console.log('Nvue 首页启动模式: fast 详见: https://ask.dcloud.net.cn/article/36749')
}
}
if (jsonFile.name === 'define-pages.js') {
appConfigContent = jsonFile.content
} else {
......@@ -122,4 +128,4 @@ module.exports = function (content) {
}
return ''
}
}
......@@ -92,8 +92,12 @@ module.exports = function (appJson, manifestJson, {
manifestJson.plus.launch_path = '__uniappview.html' // 首页地址固定
}
// nvue 首页启动模式
manifestJson.plus['uni-app'].nvueLaunchMode = manifestJson.plus.nvueLaunchMode === 'fast' ? 'fast' : 'normal'
delete manifestJson.plus.nvueLaunchMode
manifest.name = 'manifest.json'
manifest.content = JSON.stringify(manifest.content)
delete appJson.nvue
return [manifest, definePages(appJson), appConfigService(appJson)]
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册