From c820ebf2d01036567ca1d2ace1f2cfac639c7cd3 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Wed, 4 Jun 2025 22:42:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=83=BD=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.config.ts | 1 + pages.config.ts | 16 ++++++++++++++++ src/manifest.json | 7 +++++-- src/pages.json | 3 +++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/manifest.config.ts b/manifest.config.ts index 2a8b454..a0a6383 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -118,6 +118,7 @@ export default defineManifestConfig({ minified: true, }, usingComponents: true, + // lazyCodeLoading: 'requiredComponents', // 微信小程序懒加载配置 // __usePrivacyCheck__: true, }, 'mp-alipay': { diff --git a/pages.config.ts b/pages.config.ts index 547d0da..0ca07a3 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -48,4 +48,20 @@ export default defineUniPages({ }, ], }, + // 微信小程序特定配置 + // 'mp-weixin': { + // lazyCodeLoading: 'requiredComponents', // 微信小程序懒加载配置 + // }, + // 使用条件编译添加微信小程序特定配置 + // #ifdef MP-WEIXIN + // lazyCodeLoading: 'requiredComponents', + // #endif + // 使用 custom 字段注入原生微信小程序配置 + // custom: { + // mpWeixin: { + // appJson: { + // lazyCodeLoading: 'requiredComponents', + // }, + // }, + // }, }) diff --git a/src/manifest.json b/src/manifest.json index 344cc1a..2fc2e54 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -85,9 +85,12 @@ "mp-weixin": { "appid": "wxa2abb91f64032a2b", "setting": { - "urlCheck": false + "urlCheck": false, + "es6": true, + "minified": true }, - "usingComponents": true + "usingComponents": true, + "lazyCodeLoading": "requiredComponents" }, "mp-alipay": { "usingComponents": true, diff --git a/src/pages.json b/src/pages.json index d8c43f9..997e3fc 100644 --- a/src/pages.json +++ b/src/pages.json @@ -44,6 +44,9 @@ } ] }, + "mp-weixin": { + "lazyCodeLoading": "requiredComponents" + }, "pages": [ { "path": "pages/index/index",