From 18d6b5547f16775ec35682b069e8862f7010912e Mon Sep 17 00:00:00 2001 From: handongxun Date: Fri, 6 May 2022 11:50:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20uniad=20=E7=BC=96=E8=AF=91=E5=88=B0?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=20cli=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E5=A4=B1=E8=B4=A5=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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/uni-template-compiler/lib/index.js b/packages/uni-template-compiler/lib/index.js index a255a539a..920a9da23 100644 --- a/packages/uni-template-compiler/lib/index.js +++ b/packages/uni-template-compiler/lib/index.js @@ -38,9 +38,7 @@ const isWin = /^win/.test(process.platform) const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path) module.exports = { - compile (source, options = {}) { - options.modules.push(compilerModuleUniad) - + compile (source, options = {}) { if ( // 启用摇树优化后,需要过滤内置组件 !options.autoComponentResourcePath || options.autoComponentResourcePath.indexOf('@dcloudio/uni-h5/src') === -1 @@ -49,7 +47,10 @@ module.exports = { } if (!options.modules) { options.modules = [] - } + } + + options.modules.push(compilerModuleUniad) + // transformAssetUrls options.modules.push(require('./asset-url')) options.modules.push(require('./bool-attr')) -- GitLab