From 6c322b9a72f78fcdd3b558f14770114ab5a35a38 Mon Sep 17 00:00:00 2001 From: handongxun Date: Wed, 27 Apr 2022 15:53:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=AF=91=E5=88=B0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=97=B6=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6uniad=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-template-compiler/lib/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/uni-template-compiler/lib/index.js b/packages/uni-template-compiler/lib/index.js index 8b37851f0..a255a539a 100644 --- a/packages/uni-template-compiler/lib/index.js +++ b/packages/uni-template-compiler/lib/index.js @@ -38,7 +38,9 @@ const isWin = /^win/.test(process.platform) const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path) module.exports = { - compile (source, options = {}) { + compile (source, options = {}) { + options.modules.push(compilerModuleUniad) + if ( // 启用摇树优化后,需要过滤内置组件 !options.autoComponentResourcePath || options.autoComponentResourcePath.indexOf('@dcloudio/uni-h5/src') === -1 @@ -92,7 +94,6 @@ module.exports = { } options.modules.push(compilerModule) - options.modules.push(compilerModuleUniad) if (options.mp.platform === 'mp-alipay') { options.modules.push(compilerAlipayModule) -- GitLab