From 4d493a359e37a113afd57c1befefb48d35aa732e Mon Sep 17 00:00:00 2001 From: xuegan Date: Thu, 31 Oct 2024 21:20:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E7=9A=84=E9=94=99=E8=AF=AF=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?&=E6=B7=BB=E5=8A=A0virtualHost=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs-vuepress/api/compile.md | 1 + docs-vuepress/api/extend.md | 4 ++-- docs-vuepress/articles/unit-test.md | 2 +- docs-vuepress/guide/advance/size-report.md | 4 ++-- package.json | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs-vuepress/api/compile.md b/docs-vuepress/api/compile.md index 4148c04f3f..260b736b58 100644 --- a/docs-vuepress/api/compile.md +++ b/docs-vuepress/api/compile.md @@ -965,6 +965,7 @@ module.exports = defineConfig({ } }) ``` +**注意:** 建议使用`autoVirtualHostRules`配置项,不要使用微信组件内部的 options virtualHost 配置,因为组件内部的 options virtualHost 在跨平台输出时无法进行兼容抹平处理。 ### partialCompileRules diff --git a/docs-vuepress/api/extend.md b/docs-vuepress/api/extend.md index e430baa304..6eb54a6fd7 100644 --- a/docs-vuepress/api/extend.md +++ b/docs-vuepress/api/extend.md @@ -773,8 +773,8 @@ Mpx框架项目包体积可以进行分组、分包、页面、冗余Npm包等 entryRules: { include: ['@somegroup/someSdk/index', '@somegroup/someSdk2/index'] }, - // 有的时候你可能希望计算纯 js 入口引入的体积(不包含组件和页面),这种情况下需要使用 noEntryModules - noEntryModules: { + // 有的时候你可能希望计算纯 js 入口引入的体积(不包含组件和页面),这种情况下需要使用 noEntryRules + noEntryRules: { include: 'src/lib/sdk.js' } } diff --git a/docs-vuepress/articles/unit-test.md b/docs-vuepress/articles/unit-test.md index c50af957ef..00cc2fe87c 100644 --- a/docs-vuepress/articles/unit-test.md +++ b/docs-vuepress/articles/unit-test.md @@ -19,7 +19,7 @@ In computer programming, unit testing is a software testing method by which indi - 改进设计,促进重构 此外,单测高覆盖率的项目也会给公司节省大量支出: -![unit-test-money.png](https://cdn.nlark.com/yuque/0/2021/png/116604/1640872105786-b7b230b4-7f65-4a0f-8dbf-e8ba89f61837.png#averageHue=%23fcfbfa&clientId=u39d6bb3b-719d-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=577&id=u3d713c30&margin=%5Bobject%20Object%5D&name=unit-test-money.png&originHeight=1153&originWidth=2770&originalType=binary&ratio=1&rotation=0&showTitle=false&size=227658&status=done&style=none&taskId=u33caf2b6-ceb2-43ca-9da2-c631d845598&title=&width=1385) +![unit-test-money.png](https://cdn.nlark.com/yuque/0/2021/png/116604/1640872105786-b7b230b4-7f65-4a0f-8dbf-e8ba89f61837.png) 据微软统计单测效益结果,如上图展示,绝大多数bug都是在coding阶段产生,并且随着需求开发进度的推进,修复bug的成本会随指数级增长,当我们在unit test阶段发现并修复这个bug是能给公司带来巨大收益的。 下方介绍两种常见的项目单元测试规范: diff --git a/docs-vuepress/guide/advance/size-report.md b/docs-vuepress/guide/advance/size-report.md index 95090a6ba0..2c065fee9f 100644 --- a/docs-vuepress/guide/advance/size-report.md +++ b/docs-vuepress/guide/advance/size-report.md @@ -76,8 +76,8 @@ module.exports = defineConfig({ entryRules: { include: ['@somegroup/someSdk/index', '@somegroup/someSdk2/index'] }, - // 有的时候你可能希望计算纯 js 入口引入的体积(不包含组件和页面),这种情况下需要使用 noEntryModules - noEntryModules: { + // 有的时候你可能希望计算纯 js 入口引入的体积(不包含组件和页面),这种情况下需要使用 noEntryRules + noEntryRules: { include: 'src/lib/sdk.js' } } diff --git a/package.json b/package.json index cad1d9f705..8e040accbb 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ ], "dependencies": { "@types/react": "^18.3.11", - "react-native-linear-gradient": "^2.8.3" + "react-native-linear-gradient": "^2.8.3", + "vue": "^2.7.16" } } From 490756383039307fa1294b327c51ba65a64a4362 Mon Sep 17 00:00:00 2001 From: xuegan Date: Thu, 31 Oct 2024 21:21:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9package.json?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 8e040accbb..cad1d9f705 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ ], "dependencies": { "@types/react": "^18.3.11", - "react-native-linear-gradient": "^2.8.3", - "vue": "^2.7.16" + "react-native-linear-gradient": "^2.8.3" } } From 4f76291531ba1875d3ad2d35c325dae4a59b1f3d Mon Sep 17 00:00:00 2001 From: xuegan Date: Thu, 31 Oct 2024 21:25:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs-vuepress/guide/basic/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-vuepress/guide/basic/intro.md b/docs-vuepress/guide/basic/intro.md index 2de36e4d90..8e35f9dc4d 100644 --- a/docs-vuepress/guide/basic/intro.md +++ b/docs-vuepress/guide/basic/intro.md @@ -36,7 +36,7 @@ Mpx使用类似Vue的单文件开发模式,小程序原本的template/js/style * [wx:show隐藏显示](./conditional-render.md) * [component动态组件](./component.md#动态组件) * [事件处理内联传参](./event.md) -* [模板条件编译](./template.md) +* [模板条件编译](./conditional-render.md) ### 极致性能