Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MuGuiLin
uni-app
提交
1b44dd92
U
uni-app
项目概览
MuGuiLin
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1b44dd92
编写于
4月 11, 2022
作者:
S
songyu
提交者:
折腾笔记
4月 11, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 删除测试代码
上级
c8f37bf2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
6 deletion
+3
-6
packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js
...components-position/copy-wx-components-on-demand/index.js
+3
-3
packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js
...ib/independent-plugins/split-independent-chunks-plugin.js
+0
-3
未找到文件。
packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js
浏览文件 @
1b44dd92
const
collectWxComponentUsedStatus
=
require
(
'
./collect-wx-component-used-status
'
);
const
collectWxComponentUsedStatus
=
require
(
'
./collect-wx-component-used-status
'
);
const
processNormalPkg
=
require
(
'
./analyze-go-direction
'
);
const
analyzeGoDirection
=
require
(
'
./analyze-go-direction
'
);
const
{
collectPkgCopyFiles
,
copyAllWxComponentsFiles
}
=
require
(
'
../util
'
);
const
{
collectPkgCopyFiles
,
copyAllWxComponentsFiles
}
=
require
(
'
../util
'
);
const
{
wxComponentsStr
,
appJsonFileName
,
mainPkgName
}
=
require
(
'
../constant
'
);
const
{
wxComponentsStr
,
appJsonFileName
,
mainPkgName
}
=
require
(
'
../constant
'
);
const
Analyze
=
require
(
'
../analyze
'
);
const
Analyze
=
require
(
'
../analyze
'
);
...
@@ -18,10 +18,10 @@ class Index extends Analyze {
...
@@ -18,10 +18,10 @@ class Index extends Analyze {
const
{
const
{
copyForNormal
,
copyForNormal
,
copyForMain
,
copyForMain
,
}
=
processNormalPkg
(
usageByPkgMap
,
appJson
,
emitFileMap
);
}
=
analyzeGoDirection
(
usageByPkgMap
,
appJson
,
emitFileMap
);
// 提示app.json中声明的未被使用的全局原生组件(wxcomponents)
// 提示app.json中声明的未被使用的全局原生组件(wxcomponents)
const
rootToWxComponents
=
Object
.
assign
({},
copyForNormal
,
copyForMain
);
//
const rootToWxComponents = Object.assign({}, copyForNormal, copyForMain);
const
globalWxComponents
=
appJson
.
usingComponents
||
{};
const
globalWxComponents
=
appJson
.
usingComponents
||
{};
const
wxComponentPaths
=
[...
copyForMain
.
mainPkg
]
const
wxComponentPaths
=
[...
copyForMain
.
mainPkg
]
...
...
packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js
浏览文件 @
1b44dd92
...
@@ -136,9 +136,6 @@ class SplitHandler {
...
@@ -136,9 +136,6 @@ class SplitHandler {
const
newChunk
=
this
.
compilation
.
addChunk
(
chunkName
);
const
newChunk
=
this
.
compilation
.
addChunk
(
chunkName
);
newChunk
.
chunkReason
=
'
split chunk for independent
'
;
newChunk
.
chunkReason
=
'
split chunk for independent
'
;
for
(
const
module
of
newChunkInfo
.
modules
)
{
for
(
const
module
of
newChunkInfo
.
modules
)
{
if
(
module
.
rawRequest
&&
module
.
rawRequest
.
indexOf
(
'
wx-recorder-manager
'
)
>=
0
)
{
// console.log('sunqing');
}
GraphHelpers
.
connectChunkAndModule
(
newChunk
,
module
);
GraphHelpers
.
connectChunkAndModule
(
newChunk
,
module
);
[...
newChunkInfo
.
chunks
].
forEach
(
chunk
=>
{
[...
newChunkInfo
.
chunks
].
forEach
(
chunk
=>
{
if
(
this
.
removeModuleFromChunkFilter
(
chunk
))
{
if
(
this
.
removeModuleFromChunkFilter
(
chunk
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录