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

Mix exposes and remotes on the same module #171

Open
ChristPetitjean opened this issue Apr 13, 2022 · 4 comments
Open

Mix exposes and remotes on the same module #171

ChristPetitjean opened this issue Apr 13, 2022 · 4 comments
Labels
enhancement New feature or request
Projects

Comments

@ChristPetitjean
Copy link

Versions

  • originjs: 1.1.4
  • node: 14.17.0

Reproduction

go to: https://github.com/ChristPetitjean/BUG-vite-plugin-federation

1. Auth module

run npm run build. It should build fine
run npm run serve. It should serve the module on port 5002
you can navigate to http://localhost:5002 to confirm the site starts

2. Header module

run npm run build. It should build fine
run npm run serve. It should serve the module on port 5001
you can navigate to http://localhost:5001 to confirm the site starts

3. Portal module

run npm run dev. It should run the portal and the header should be displayed
Here you can notice a thing.
The vue-router is not shared (visible because no link are highlighted) whereas they were highlighted when runing http://localhost:5001 directly.
But that is not the major issue here.

Steps to reproduce

To reproduce switch to the branch: bug-remotes-exposes: https://github.com/ChristPetitjean/BUG-vite-plugin-federation/tree/bug-remotes-exposes
Or open the pull request to see differences: ChristPetitjean/BUG-vite-plugin-federation#1

What is Expected?

Header module is able to build

What is actually happening?

When activating auth module in header (so header have remotes and exposes configured), it will not build at all.

@ruleeeer ruleeeer added the working on This work is being done label Apr 19, 2022
@ruleeeer
Copy link
Collaborator

I probably know what the reason for the failure is, because federation's shared only looks under node_modules, not according to its own remotes, so it can't find auth modules
image

@ruleeeer
Copy link
Collaborator

This should be one of the subsequent features to be implemented, I'll add it to the plan first, thanks

@ruleeeer ruleeeer added this to H1 2022 in Roadmap Apr 19, 2022
@ruleeeer ruleeeer added enhancement New feature or request and removed working on This work is being done labels Apr 19, 2022
@dschewchenko
Copy link
Contributor

Hello @ruleeeer. Any progress on it? Because it's really must to have, because of migrating big project from webpack to vite

@ChristPetitjean
Copy link
Author

Any news @ruleeeer ?
I see it in Roadmap H2 2022 but as we are now 2023, do you have some visibility ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Roadmap
H2 2022
Development

No branches or pull requests

3 participants