提交 20d501d0 编写于 作者: fxy060608's avatar fxy060608

feat(app-plus): confusion.resources with static,hybrid/html

上级 2ae61779
......@@ -339,6 +339,10 @@ module.exports = function (pagesJson, userManifestJson, isAppView) {
const nvuePages = (appJson.nvue && appJson.nvue.pages) || {}
for (const key in confusion.resources) {
if (path.extname(key) === '.js') { // 支持 js 混淆,过滤掉
// 静态 js 文件
if (key.indexOf('hybrid/html') === 0 || key.indexOf('static/') === 0 || key.indexOf('/static/') !== -1) {
resources[key] = confusion.resources[key]
}
continue
}
if (!/\.nvue$/.test(key)) {
......@@ -349,7 +353,8 @@ module.exports = function (pagesJson, userManifestJson, isAppView) {
if (!Object.keys(nvuePages).find(path => {
const subNVues = nvuePages[path].window.subNVues || []
// TODO
return (path.replace(/\.html$/, '.nvue') === key || path.replace(/\.html$/, '.nvue') + '.nvue' === key) || subNVues.find(({
return (path.replace(/\.html$/, '.nvue') === key || path.replace(/\.html$/, '.nvue') + '.nvue' === key) ||
subNVues.find(({
path
}) => path === key.replace(/\.nvue$/, ''))
}) && !pagesJson.pages.find(({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册