From b33bd914612d7dda9e28ef52a4b6acde3ad5bfe6 Mon Sep 17 00:00:00 2001 From: dengly Date: Tue, 14 May 2024 20:08:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=92=8C=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A1=B9=E7=9B=AE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-mp-alipay/dist/uni.compiler.js | 16 +++++++++++----- .../uni-mp-alipay/src/compiler/mini.project.json | 10 +++++++--- packages/uni-mp-weixin/dist/uni.compiler.js | 3 ++- .../src/compiler/project.config.json | 3 ++- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/packages/uni-mp-alipay/dist/uni.compiler.js b/packages/uni-mp-alipay/dist/uni.compiler.js index 9bcd3e714b..aa3d2760c2 100644 --- a/packages/uni-mp-alipay/dist/uni.compiler.js +++ b/packages/uni-mp-alipay/dist/uni.compiler.js @@ -17,11 +17,17 @@ var appid = "touristappid"; var component2 = true; var enableAppxNg = true; var enableNodeModuleBabelTransform = true; -var source = { - appid: appid, - component2: component2, - enableAppxNg: enableAppxNg, - enableNodeModuleBabelTransform: enableNodeModuleBabelTransform +// 编译后写到 mini.project.json 的配置信息,这里需要修改,支付宝工程编译配置已经改变了 +var globalObjectMode = "enable"; +var source = { + appid: appid, + format: 2, + compileOptions: { + component2: component2, + enableNodeModuleBabelTransform: enableNodeModuleBabelTransform, + globalObjectMode: globalObjectMode + }, + enableAppxNg: enableAppxNg }; function transformRef(node, context) { diff --git a/packages/uni-mp-alipay/src/compiler/mini.project.json b/packages/uni-mp-alipay/src/compiler/mini.project.json index 90b11d91a5..ca59c3d108 100644 --- a/packages/uni-mp-alipay/src/compiler/mini.project.json +++ b/packages/uni-mp-alipay/src/compiler/mini.project.json @@ -1,6 +1,10 @@ { "appid": "touristappid", - "component2": true, - "enableAppxNg": true, - "enableNodeModuleBabelTransform": true + "format": 2, + "compileOptions": { + "component2": true, + "enableNodeModuleBabelTransform": true, + "globalObjectMode": "enable" + }, + "enableAppxNg": true } diff --git a/packages/uni-mp-weixin/dist/uni.compiler.js b/packages/uni-mp-weixin/dist/uni.compiler.js index 6144e82c39..0bd12095ec 100644 --- a/packages/uni-mp-weixin/dist/uni.compiler.js +++ b/packages/uni-mp-weixin/dist/uni.compiler.js @@ -77,7 +77,8 @@ var setting = { postcss: false, minified: false, newFeature: true, - bigPackageSizeSupport: true + bigPackageSizeSupport: true, + condition: true }; var compileType = "miniprogram"; var libVersion = ""; diff --git a/packages/uni-mp-weixin/src/compiler/project.config.json b/packages/uni-mp-weixin/src/compiler/project.config.json index 9618d58626..271b869bee 100644 --- a/packages/uni-mp-weixin/src/compiler/project.config.json +++ b/packages/uni-mp-weixin/src/compiler/project.config.json @@ -9,7 +9,8 @@ "postcss": false, "minified": false, "newFeature": true, - "bigPackageSizeSupport": true + "bigPackageSizeSupport": true, + "condition": true }, "compileType": "miniprogram", "libVersion": "", -- Gitee