提交 e4c0e281 编写于 作者: Q qiang

feat: 原生混淆支持subNVues

上级 337adb7c
...@@ -311,7 +311,14 @@ module.exports = function (pagesJson, userManifestJson) { ...@@ -311,7 +311,14 @@ module.exports = function (pagesJson, userManifestJson) {
} else { } else {
resources[key.replace(/\.nvue$/, '.js')] = confusion.resources[key] resources[key.replace(/\.nvue$/, '.js')] = confusion.resources[key]
} }
if (!Object.keys(appJson.nvue.pages).find(path => path.replace(/\.html$/, '.nvue') === key)) { if (!Object.keys(appJson.nvue.pages).find(path => {
const subNVues = appJson.nvue.pages[path].window.subNVues || []
return path.replace(/\.html$/, '.nvue') === key || subNVues.find(({ path }) => path === key.replace(/\.nvue$/, ''))
}) && !pagesJson.pages.find(({ style = {} }) => {
style = Object.assign(style, style['app-plus'])
const subNVues = style.subNVues || []
return subNVues.find(({ path }) => path === key.replace(/\.nvue$/, ''))
})) {
throw new Error(`原生混淆页面未在项目内使用,错误的页面路径:${key}`) throw new Error(`原生混淆页面未在项目内使用,错误的页面路径:${key}`)
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册