Skip to content

Commit

Permalink
fix tt async subpackages
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki committed Aug 12, 2024
1 parent 8e2e9da commit 948eda8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/webpack-plugin/lib/json-compiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ module.exports = function (content) {
for (const root in subPackagesCfg) {
const subPackageCfg = subPackagesCfg[root]
// 分包不存在 pages,输出 subPackages 字段会报错
if (subPackageCfg.pages.length) {
// tt模式下分包异步允许一个分包不存在 pages
if (subPackageCfg.pages.length || mode === 'tt') {
if (!json.subPackages) {
json.subPackages = []
}
Expand Down
1 change: 0 additions & 1 deletion packages/webpack-plugin/lib/platform/json/wx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ module.exports = function getSpec ({ warn, error }) {
test: 'componentPlaceholder',
ali: aliComponentPlaceholderFallback,
swan: deletePath(),
tt: deletePath(),
jd: deletePath()
},
{
Expand Down

0 comments on commit 948eda8

Please sign in to comment.