core
core copied to clipboard
webpack4 cannot use @module-federation/enhanced/runtime
Describe the bug
webpack4 cannot use @module-federation/enhanced/runtime
webpack4 的 enhanced-resolve 对 @scope/package/subpath 这种“scope + 子路径”的解析逻辑不完善,需要手动指定别名或确保包的目录结构符合预期;
- 但是此项目多个包之间相互依赖,设置起来相当费劲,请给出示例或者修复一下
Reproduction
vue-cli 4.x创建的项目,然后直接引用
https://github.com/long36708/vue2-cli4-use-mf-demo
Used Package Manager
npm
System Info
与此无关,webpack4和当前插件包的问题
Validations
- [x] Read the docs.
- [x] Read the common issues list.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Make sure this is a Module federation issue and not a framework-specific issue.
- [x] The provided reproduction is a minimal reproducible example of the bug.