提交 047c6211 编写于 作者: d-u-a's avatar d-u-a

fix: 纯 nvue 项目配置混淆后打包编译出错的问题

上级 94d0c2e2
......@@ -179,8 +179,8 @@ module.exports = function (pagesJson, userManifestJson) {
if (!manifestJson.permissions) {
manifestJson.permissions = {}
}
const nvuePages = pagesJson.nvue && pagesJson.nvue.pages
const nvuePages = process.env.UNI_USING_V3_NATIVE ? pagesJson.pages : (pagesJson.nvue && pagesJson.nvue.pages)
if (nvuePages && nvuePages.length) {
const pages = {}
......@@ -197,10 +197,13 @@ module.exports = function (pagesJson, userManifestJson) {
appJson.nvue = {
pages
}
if (process.env.UNI_USING_V3_NATIVE) {
appJson.nvue.entryPagePath = nvuePages[0]
} else if (pagesJson.nvue.entryPagePath) {
appJson.nvue.entryPagePath = pagesJson.nvue.entryPagePath
}
if (pagesJson.nvue.entryPagePath) {
appJson.nvue.entryPagePath = pagesJson.nvue.entryPagePath
}
// nvue 权限
manifestJson.permissions.UniNView = {
description: 'UniNView原生渲染'
......@@ -344,9 +347,10 @@ module.exports = function (pagesJson, userManifestJson) {
resources[key.replace(/\.nvue$/, '.js')] = confusion.resources[key]
}
if (!Object.keys(nvuePages).find(path => {
const subNVues = nvuePages[path].window.subNVues || []
return path.replace(/\.html$/, '.nvue') === key || subNVues.find(({
path
const subNVues = nvuePages[path].window.subNVues || []
// TODO
return (path.replace(/\.html$/, '.nvue') === key || path.replace(/\.html$/, '.nvue') + '.nvue' === key) || subNVues.find(({
path
}) => path === key.replace(/\.nvue$/, ''))
}) && !pagesJson.pages.find(({
style = {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册