Skip to content

Commit

Permalink
feat(mf): 新增remoteHash参数控制mf的产物是否启用hash(#11711)
Browse files Browse the repository at this point in the history
  • Loading branch information
consistent-k committed Oct 9, 2023
1 parent 28615c6 commit c3dd2a6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/docs/docs/max/mf.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ src/exposes/
}
```

### 关闭MF产物Hash
默认情况下,当用户开启 hash: true 时, MF 产物中入口文件将自动携带 hash ,如 remote.123abc.js ,可通过设定 mf.remoteHash: false 关闭(将得到 remote.js ),此时你可能需要修改 nginx / CDN / 网关 的响应头配置来去除该 remote.js 文件的缓存,否则新构建将无法生效。
```js
mf: {
remoteHash: false
}
```

## 运行时 API

### 何时需要使用运行时 API ?
Expand Down Expand Up @@ -415,4 +423,4 @@ export default defineConfig({
},
},
}
```
```

0 comments on commit c3dd2a6

Please sign in to comment.