Comments (9)
我不知道为什么你的 example 里的子应用为什么用的都是主应用的 html ,你可以在子应用的 html 里通过动态 import 通过上面图片的方式再次导出就行,你可以试一下,不过因为你的 example 用的都是主应用的,我不是太好去验证,你可以按照这个思路试试看
from garfish.
我不知道为什么你的 example 里的子应用为什么用的都是主应用的 html ,你可以在子应用的 html 里通过动态 import 通过上面图片的方式再次导出就行,你可以试一下,不过因为你的 example 用的都是主应用的,我不是太好去验证,你可以按照这个思路试试看
@zhoushaw 加上动态 import这段,前面 <script type="module" src="/main/index.tsx"></script>
需要去掉吗?我在本地试的把 <script type="module" src="/main/index.tsx"></script>
去掉才可以正常运行
from garfish.
@festina-lente-z 是的,下面有加载就不需要重新设置了
from garfish.
@festina-lente-z 是的,下面有加载就不需要重新设置了
👌
from garfish.
我也遇到了相同问题,子应用引入 rxjs 报错: var GARFISH_EXPORTS = window.__GARFISH_ESM_ENV___0.GARFISH_EXPORTS; 报错: Cannot read properties of undefined (reading 'GARFISH_EXPORTS') , 尝试了你的方法还是报同样的错误
我不知道为什么你的 example 里的子应用为什么用的都是主应用的 html ,你可以在子应用的 html 里通过动态 import 通过上面图片的方式再次导出就行,你可以试一下,不过因为你的 example 用的都是主应用的,我不是太好去验证,你可以按照这个思路试试看
from garfish.
from garfish.
@yubignhua 动态 import 的话,
这行需要去掉
from garfish.
版本:
"garfish": "^1.17.6",
"@garfish/bridge-vue-v3": "^1.17.6",
"rxjs": "^7.8.1",
"vue": "3.3.0",
"vite": "^5.2.8",
from garfish.
版本: "garfish": "^1.17.6", "@garfish/bridge-vue-v3": "^1.17.6", "rxjs": "^7.8.1", "vue": "3.3.0", "vite": "^5.2.8",
@yubignhua main.ts不是子应用入口文件吧?main.ts你定义provider了吗?
from garfish.
Related Issues (20)
- Garfish preload plugin HOT 3
- domGetter为string且dom树下没有对应的节点,会导致无限递归。 HOT 2
- support entry of AppInfo as function HOT 6
- 子应用动态挂载子app时会出现destroy 不是一个function HOT 30
- RegisterMicroApps.jsx:102 TypeError: Cannot read properties of undefined (reading 'call') HOT 2
- app.show 是否支持传参,更新 props HOT 3
- registerApp 设置 basename 之后用于 activeWhen 判断的 path 处理方式是否有问题 HOT 3
- 中文文档意义不明 HOT 1
- Svelte(kit) bridge support ?
- 将vite子应用正常打包后在应用渲染异常,开发环境时一切正常
- @garfish/es-module returns "does not provide an export named..." while analyse module with `export * from ...` HOT 2
- TypeScript: Could not find a declaration file for module "garfish" HOT 4
- 官网文档不友好 HOT 2
- 支持 ssr 的子应用接入吗,如next.js HOT 2
- 微应用之间跨域cookie携带问题 HOT 1
- TemplateManager.findAttributeValue对值为空的HTML布尔属性处理错误 HOT 1
- 支持带基座启动 vite + React 子应用吗? HOT 10
- @garfish/css-scope 中的 super-fast-md5 依赖,在 vite 环境下会报错 HOT 1
- 子应用引入Leaflet时garfish会报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garfish.