Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic loading remote from web-component #2

Open
floflojaja opened this issue Apr 1, 2021 · 0 comments
Open

Dynamic loading remote from web-component #2

floflojaja opened this issue Apr 1, 2021 · 0 comments

Comments

@floflojaja
Copy link

Hi,

I'm currently work arround module federation and a microfrontend architecture. this repository have given me a really valuable help for my project.

Now i meet a problem when i want to load remote dynamically. In fact, your plugin (module-federation-plugin) allow us to load module but not web-component like when you expoded the "bootstrap.ts" file. When i try to retrieve the "./web-components" element from the container like this :

const container = window[remoteName];
const factory = await container.get(exposedElement);
const Element = factory();
console.log(Element)

It is empty...

So you have an idea to solve this problem ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant