From 1b44dd921d1a7f97ec4b1070ccc0fde9f8acfc9d Mon Sep 17 00:00:00 2001 From: songyu Date: Mon, 11 Apr 2022 16:38:36 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../copy-wx-components-on-demand/index.js | 6 +++--- .../independent-plugins/split-independent-chunks-plugin.js | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js b/packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js index e582ba1b45..90f10ef2d1 100644 --- a/packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js +++ b/packages/uni-mp-weixin/lib/independent-plugins/optimize-components-position/copy-wx-components-on-demand/index.js @@ -1,5 +1,5 @@ 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 { wxComponentsStr, appJsonFileName, mainPkgName } = require('../constant'); const Analyze = require('../analyze'); @@ -18,10 +18,10 @@ class Index extends Analyze { const { copyForNormal, copyForMain, - } = processNormalPkg(usageByPkgMap, appJson, emitFileMap); + } = analyzeGoDirection(usageByPkgMap, appJson, emitFileMap); // 提示app.json中声明的未被使用的全局原生组件(wxcomponents) - const rootToWxComponents = Object.assign({}, copyForNormal, copyForMain); + // const rootToWxComponents = Object.assign({}, copyForNormal, copyForMain); const globalWxComponents = appJson.usingComponents || {}; const wxComponentPaths = [...copyForMain.mainPkg] diff --git a/packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js b/packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js index b3bd2773c9..ff77f9083a 100644 --- a/packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js +++ b/packages/uni-mp-weixin/lib/independent-plugins/split-independent-chunks-plugin.js @@ -136,9 +136,6 @@ class SplitHandler { const newChunk = this.compilation.addChunk(chunkName); newChunk.chunkReason = 'split chunk for independent'; for (const module of newChunkInfo.modules) { - if (module.rawRequest && module.rawRequest.indexOf('wx-recorder-manager') >= 0) { - // console.log('sunqing'); - } GraphHelpers.connectChunkAndModule(newChunk, module); [...newChunkInfo.chunks].forEach(chunk => { if (this.removeModuleFromChunkFilter(chunk)) { -- GitLab