问题: Vue3 组件如何在 Vue2 应用程序中使用,带有 module-federation。有人需要它,不知何故。
错误: 未捕获错误:共享模块不可用于急切消费:webpack/sharing/consume/default/vue/vue
希望: Vue3 组件可以在 Vue2 应用程序中使用,通过模块联合。
public/index.html:- 添加脚本标签
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="referrer" content="no-referrer">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" id="faviconLink" href="static/img/favicon.ico">
<script src="http://localhost:3000/assets/remoteEntry-app3.js"></script>
</head>
<body>
<div id="app"></div>
</body>
</html>