We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
System: OS: Windows 11 10.0.22631 CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz Memory: 13.99 GB / 31.95 GB Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.22621.3527 npmPackages: @modern-js/app-tools: 2.60.3 => 2.60.3 @modern-js/module-tools: 2.60.3 => 2.60.3 @modern-js/runtime: 2.60.3 => 2.60.3
参照文档 host在dev时应该会自动下载remotes的@mf-types才对。 我之前用rsbuild+MF2的时候也确实会自动下载。 但现在转到modern.js后就不行了,试了实例项目,发现也不行。 我看 http://localhost:xxxx/mf-manifest.json 中明明是有metaData.types节点的, 调用 http://localhost:xxxx/@mf-types.zip 也确实能下载到内容
https://github.com/web-infra-dev/modern-js-examples/tree/main/examples/module-federation/base
console1: cd module-federation\base\remote pnpm i pnpm dev
console2: cd module-federation\base\host pnpm i rm -rf @mf-types pnpm dev
浏览器打开http://localhost:8080,console2 出现错误
The text was updated successfully, but these errors were encountered:
我好像没有办法复现你的错误,升级到了 1.60.3,移除了 @mf-types,在运行 dev 的时候 MF 自动下载了类型。你通过 VSCode 能够跳转到指定的文件吗。
Sorry, something went wrong.
有个同事电脑可以,我试了就不行,应该是我哪里配置有问题,我再看看吧。
应该不是modern.js的问题,我试了rsbuild的例子,也无法下载。把node升级到了最新,还尝试了yarn,还是不行。 不知道是不是系统的问题。 下一步要试的话,得要调试mf源码了,算了,懒得折腾了
有可能是你全局 ts 版本,或者上层目录 tsconfig.json 的问题等。
zllkjc
No branches or pull requests
版本信息
System:
OS: Windows 11 10.0.22631
CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Memory: 13.99 GB / 31.95 GB
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@modern-js/app-tools: 2.60.3 => 2.60.3
@modern-js/module-tools: 2.60.3 => 2.60.3
@modern-js/runtime: 2.60.3 => 2.60.3
问题详情
参照文档
host在dev时应该会自动下载remotes的@mf-types才对。
我之前用rsbuild+MF2的时候也确实会自动下载。
但现在转到modern.js后就不行了,试了实例项目,发现也不行。
我看 http://localhost:xxxx/mf-manifest.json 中明明是有metaData.types节点的,
调用 http://localhost:xxxx/@mf-types.zip 也确实能下载到内容
复现链接
https://github.com/web-infra-dev/modern-js-examples/tree/main/examples/module-federation/base
复现步骤
console1:
cd module-federation\base\remote
pnpm i
pnpm dev
console2:
cd module-federation\base\host
pnpm i
rm -rf @mf-types
pnpm dev
浏览器打开http://localhost:8080,console2 出现错误
The text was updated successfully, but these errors were encountered: