我有以下3个存储库。
根目录配置-> https://github.com/sravan464/web-root-spa
react mfe -> https://github.com/sravan464/mfe-react-1
vanilla实用程序模块-> https://github.com/sravan464/single-spa-util-module-vanilla
我正在尝试理解如何从single-spa vanilla utility module中导出一个函数,以及如何在我的react-mfe中导入该函数?我们需要在根配置的导入映射中添加一个普通实用程序模块吗?
发布于 2021-10-25 10:02:42
你可能需要更新你的root-config的index.ejs,似乎通向普通实用程序模块的路径是错误的:
root-config存储库index.ejs中的当前
"@sravan-org/single-spa-util-module-vanilla":"//http://localhost:8081/sravan-org-single-spa-util-module-vanilla.js“
更正一条:
"@sravan-org/single-spa-util-module-vanilla":"//localhost:8081/sravan-org-single-spa-util-module-vanilla.js“
你不需要加上"http://".
https://stackoverflow.com/questions/69262785
复制相似问题