Closed yuanlf closed 2 years ago
子应用 external 改成:
externals: {
react: "react",
"react-dom": "react-dom",
"react-router-dom": "react-router-dom",
},
子应用 external 改成:
externals: { react: "react", "react-dom": "react-dom", "react-router-dom": "react-router-dom", },
可行,谢谢
Describe the bug
1)基座项目设置了共享依赖 Garfish.setExternal({ react: React, "react-dom": ReactDOM, "react-router-dom": ReactRouterDom, }); 2)子项目 webpack 中配置了 externals externals: { react: "React", "react-dom": "ReactDOM", "react-router-dom": "ReactRouterDOM", }, 3)加载子项目时,会提示如下错误 [Garfish warning]: Package "ReactDOM" is not found [Garfish warning]: Package "React" is not found
Reproduction
https://www.garfishjs.org/
Used Package Manager
npm
System Info
Validations