Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/didi/mpx
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki committed Nov 1, 2024
2 parents c0e8a26 + 5d8de70 commit 87e034d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs-vuepress/api/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ module.exports = defineConfig({
}
})
```
**注意:** 建议使用`autoVirtualHostRules`配置项,不要使用微信组件内部的 options virtualHost 配置,因为组件内部的 options virtualHost 在跨平台输出时无法进行兼容抹平处理。

### partialCompileRules

Expand Down
4 changes: 2 additions & 2 deletions docs-vuepress/api/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs-vuepress/articles/unit-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -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是能给公司带来巨大收益的。

下方介绍两种常见的项目单元测试规范:
Expand Down
4 changes: 2 additions & 2 deletions docs-vuepress/guide/advance/size-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs-vuepress/guide/basic/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Mpx使用类似Vue的单文件开发模式,小程序原本的template/js/style
* [wx:show隐藏显示](./conditional-render.md)
* [component动态组件](./component.md#动态组件)
* [事件处理内联传参](./event.md)
* [模板条件编译](./template.md)
* [模板条件编译](./conditional-render.md)

### 极致性能

Expand Down

0 comments on commit 87e034d

Please sign in to comment.