提交 2f7d8739 编写于 作者: Q qiang

docs: 修正 optimization 示例代码

上级 9c6d0639
...@@ -275,18 +275,20 @@ Tips:`uni-app` 中 `manifest.json->h5->devServer` 实际上对应 `webpack` ...@@ -275,18 +275,20 @@ Tips:`uni-app` 中 `manifest.json->h5->devServer` 实际上对应 `webpack`
```json ```json
"h5": { "h5": {
"optimization": { "optimization": {
"enable": true, "treeShaking": {
"modules": [ "enable": true,
{ "modules": [
"name": "network", {
"title": "网络", "name": "network",
"apiList": [ "title": "网络",
"uni.request": true,//配置为true,表示将会使用此API,不会被优化(未配置的API默认值为true "apiList": [
"uni.downloadFile": false,//配置为false,经过扫描项目中未使用此API的话,打包的后将不包含此API "uni.request": true,//配置为true,表示将会使用此API,不会被优化(未配置的API默认值为true
... "uni.downloadFile": false,//配置为false,经过扫描项目中未使用此API的话,打包的后将不包含此API
] ...
} ]
] }
]
}
} }
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册