-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] hash:true 可以不对模块联邦的构建产物生效 #11711
Comments
没有 hash 的危害如果名字没有 hash 就使得你需要对这个 为什么 hash 是友好的目前市面上或者企业内 CDN 广泛默认的配置就是对 JS 文件有长期的缓存头,这就要求把 js 文件都带上 hash ,所以在 mf 的场景,所有的 目前考虑的改良方向考虑到小范围场景的应用,确实有用户需要不带 hash 的 |
补充风险
from @stormslowly #11714 (comment) 推荐的做法推荐的做法 还是有一个配置中心,下发一个当前使用的 remote 的 url,这样产物始终用都是同一次构建的内容。 |
* feat(mf): 新增remoteHash参数控制mf的产物是否启用hash(#11711) * Update packages/plugins/src/mf.ts Co-authored-by: 咲奈Sakina <59400654+fz6m@users.noreply.github.com> * feat(mf): 新增remoteHash参数控制mf的产物是否启用hash(#11711) * Update docs/docs/docs/max/mf.md * Update docs/docs/docs/max/mf.md * Update docs/docs/docs/max/mf.md --------- Co-authored-by: 咲奈Sakina <59400654+fz6m@users.noreply.github.com>
参考https://umijs.org/docs/max/mf#rawmfimport 这个之后,每次的url也都是写死的,我在加载的js后面加上?t=Date.now(),之后发现,remote.js会去加载路径下的别的资源,此时加载的资源路径就出了问题,有什么解决方法不 |
我也是,同问 |
1、项目为了避免缓存需要开启hash:true;
2、最近需要将项目内的部分组件进行共享给其他工程,使用模块联邦配置;
3、之后发现构建产物里remote.js 也会被加hash后缀,这样其他工程就无法固定remote的地址了;
需求:修改hash: true的生效范围不对mf的产物生效
The text was updated successfully, but these errors were encountered: