From c3dd2a68a8c75ee3633ac31ac6df91fb975bec67 Mon Sep 17 00:00:00 2001 From: consistent-k <67736912+consistent-k@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:01:54 +0000 Subject: [PATCH] =?UTF-8?q?feat(mf):=20=E6=96=B0=E5=A2=9EremoteHash?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8E=A7=E5=88=B6mf=E7=9A=84=E4=BA=A7?= =?UTF-8?q?=E7=89=A9=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8hash(#11711)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/docs/max/mf.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/docs/docs/max/mf.md b/docs/docs/docs/max/mf.md index 49b9036d56e3..5ec5948c43e9 100644 --- a/docs/docs/docs/max/mf.md +++ b/docs/docs/docs/max/mf.md @@ -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 ? @@ -415,4 +423,4 @@ export default defineConfig({ }, }, } -``` +``` \ No newline at end of file