GithubHelp home page GithubHelp logo

Comments (9)

zhoushaw avatar zhoushaw commented on June 8, 2024

image
我不知道为什么你的 example 里的子应用为什么用的都是主应用的 html ,你可以在子应用的 html 里通过动态 import 通过上面图片的方式再次导出就行,你可以试一下,不过因为你的 example 用的都是主应用的,我不是太好去验证,你可以按照这个思路试试看

from garfish.

festina-lente-z avatar festina-lente-z commented on June 8, 2024

image 我不知道为什么你的 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.

zhoushaw avatar zhoushaw commented on June 8, 2024

@festina-lente-z 是的,下面有加载就不需要重新设置了

from garfish.

festina-lente-z avatar festina-lente-z commented on June 8, 2024

@festina-lente-z 是的,下面有加载就不需要重新设置了

👌

from garfish.

yubignhua avatar yubignhua commented on June 8, 2024

我也遇到了相同问题,子应用引入 rxjs 报错: var GARFISH_EXPORTS = window.__GARFISH_ESM_ENV___0.GARFISH_EXPORTS; 报错: Cannot read properties of undefined (reading 'GARFISH_EXPORTS') , 尝试了你的方法还是报同样的错误

image

image 我不知道为什么你的 example 里的子应用为什么用的都是主应用的 html ,你可以在子应用的 html 里通过动态 import 通过上面图片的方式再次导出就行,你可以试一下,不过因为你的 example 用的都是主应用的,我不是太好去验证,你可以按照这个思路试试看

from garfish.

yubignhua avatar yubignhua commented on June 8, 2024

image
image

from garfish.

festina-lente-z avatar festina-lente-z commented on June 8, 2024

@yubignhua 动态 import 的话,
20240515101512
这行需要去掉

from garfish.

yubignhua avatar yubignhua commented on June 8, 2024

改为动态引入:
image

报错:
image

版本:
"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.

festina-lente-z avatar festina-lente-z commented on June 8, 2024

改为动态引入: image

报错: image

版本: "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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.