소스 검색

chore: 都不生效

feige996 11 달 전
부모
커밋
c820ebf2d0
4개의 변경된 파일25개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      manifest.config.ts
  2. 16 0
      pages.config.ts
  3. 5 2
      src/manifest.json
  4. 3 0
      src/pages.json

+ 1 - 0
manifest.config.ts

@@ -118,6 +118,7 @@ export default defineManifestConfig({
       minified: true,
     },
     usingComponents: true,
+    // lazyCodeLoading: 'requiredComponents', // 微信小程序懒加载配置
     // __usePrivacyCheck__: true,
   },
   'mp-alipay': {

+ 16 - 0
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',
+  //     },
+  //   },
+  // },
 })

+ 5 - 2
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,

+ 3 - 0
src/pages.json

@@ -44,6 +44,9 @@
       }
     ]
   },
+  "mp-weixin": {
+    "lazyCodeLoading": "requiredComponents"
+  },
   "pages": [
     {
       "path": "pages/index/index",