diff --git a/packages/webpack-plugin/lib/json-compiler/index.js b/packages/webpack-plugin/lib/json-compiler/index.js index 9178d22f21..f0386554a9 100644 --- a/packages/webpack-plugin/lib/json-compiler/index.js +++ b/packages/webpack-plugin/lib/json-compiler/index.js @@ -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 = [] } diff --git a/packages/webpack-plugin/lib/platform/json/wx/index.js b/packages/webpack-plugin/lib/platform/json/wx/index.js index bae604cb18..2562b9ff44 100644 --- a/packages/webpack-plugin/lib/platform/json/wx/index.js +++ b/packages/webpack-plugin/lib/platform/json/wx/index.js @@ -153,7 +153,6 @@ module.exports = function getSpec ({ warn, error }) { test: 'componentPlaceholder', ali: aliComponentPlaceholderFallback, swan: deletePath(), - tt: deletePath(), jd: deletePath() }, {