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

Support to expose sharable components to non-vite based projects built on webpack 5. #23

Closed
codeandgyan opened this issue Feb 5, 2024 · 8 comments

Comments

@codeandgyan
Copy link

codeandgyan commented Feb 5, 2024

This module federation plugin works well when both remote and host apps are built using vite.
However, I didn't find a way to expose sharable components using module federation to non-vite applications and vice-a-versa.

Here are some scenarios:
Scenario 1:
A: I have a vite based react application that uses this vite module federation plugin to expose some sharable components.

B: I have a non-vite based react application that is built using webpack 5 (also supports module federation). This application needs to consume a shareable component built in A. How do I do that?

C: I have an angularjs app which wants to consume A. How is it possible?

Scenario 2:
A: I have a vite based react application that should consume a UI component built by another application B or C as explained below.

B: This is a non-vite based react application that uses webpack 5 which exposes some sharable components using module federation.

C: I have an angularjs app which has exposed shareable components using module federation.


Essentially, I want the module-federation should be framework agnostic.

Request you to please guide me with building above capabilities.

Appreciate your efforts in building this library.

@gioboa
Copy link
Collaborator

gioboa commented Feb 5, 2024

Hi, I understand your needs.
can you share a basic repo example pls?

@codeandgyan
Copy link
Author

Well, I don't have a sample app build as of now. I will share with you once I build one.
Thanks for your prompt reply.

@gioboa
Copy link
Collaborator

gioboa commented Feb 5, 2024

Yep, thanks. A basic example is the easiest way to figure out a solution.

@kaidjohnson
Copy link

I have created a basic example demonstrating the issue with interoperability between webpack Module Federation and vite Native Federation, both with a vite host and webpack remote as well as a webpack host with a vite remote. The issues are slightly different, depending on which side each stack is on.

@Cafezinho
Copy link

Anyone figured out a way to handle remoteEntry.json with a Module Federation host?

@gioboa
Copy link
Collaborator

gioboa commented May 26, 2024

We are working on a new version that will definitely solves this. @ScriptedAlchemy did a big step forward, he did the official esbuild adapter and the runtime loaders too.

@renansoares
Copy link

renansoares commented Jun 24, 2024

@gioboa @ScriptedAlchemy any news on this? a way to support webpack + native federation? I'm happy to help if any help is needed to proceed with this.

@gioboa
Copy link
Collaborator

gioboa commented Aug 16, 2024

We are working on a new version of this package in this PR
I'm closing this issue, if you want, you can try the new version and give us feedback. Thanks.

@gioboa gioboa closed this as completed Aug 16, 2024
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

5 participants