Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经构建了三个微前端 Angular 应用程序,一个在端口 4200 上作为主机运行。和另外两个分别在端口 4201 和 4202 上作为远程运行。
它在本地 ng 服务上运行良好,并通过 remote.js 文件获得响应。
但是当我在使用 http-server 创建 build -dist 文件夹后尝试在服务器上运行时,它会抛出 cors origin 错误。主机 webpack.config.js:
远程 webpack.config.js:
请提出相同的建议。帮助将不胜感激。