icestark icon indicating copy to clipboard operation
icestark copied to clipboard

react微应用:主应用(vite+vue3)无法获取create-react-app创建的子应用生命周期

Open luuwang opened this issue 3 years ago • 2 comments

1、官方方式创建主应用:npm init ice icestark-layout @vue-materials/icestark-layout-app 官方create-react-app 子应用示例:https://github.com/maoxiaoke/icestark-cra-child 主应用调用子应用会报如下错误: apps.js:287 TypeError: Cannot read properties of undefined (reading 'webpackHotUpdatexxxx') image

2、根据 已有React项目改造为微应用文档(https://micro-frontends.ice.work/docs/guide/use-child/react/)改在现有react应用,之后还是报 icestark minified message #1: Unable to retrieve lifecycles of platform after loading it. 尝试了文档中说的解决方案之后还是未能解决问题 image

官方可以出一个基于create-react-app调用的例子吗 期待您的回复,谢谢

luuwang avatar Oct 14 '22 01:10 luuwang

提供下主应用在接入时的配置

ClarkXia avatar Oct 18 '22 07:10 ClarkXia

{ name: 'react', activePath: '/react', title: 'React', loadScriptMode: 'import', entry: 'http://localhost:3001', container, } image

luuwang avatar Oct 18 '22 07:10 luuwang