提交 6e3f5569 编写于 作者: d-u-a's avatar d-u-a

fix: 检测到 pages.json condition 起始页无效时终止编译,输出详细信息

上级 ca8644f7
......@@ -82,7 +82,13 @@ module.exports = function (appJson, manifestJson, {
// 删除首页 style 中的 uni-app 配置(不注入 app-view.js)
delete manifestJson.plus.launchwebview['uni-app']
const entryPagePath = appJson.entryPagePath
const entryPagePath = appJson.entryPagePath
if (!appJson.page[entryPagePath]) {
console.error(
`pages.json condition['list'][current]['path']: ${entryPagePath} 需在 pages 数组中`
)
process.exit(0)
}
if (appJson.page[entryPagePath].nvue) { // 首页是 nvue
manifestJson.launch_path = '' // 首页地址为空
manifestJson.plus.launchwebview.uniNView = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册