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

Remotes under different name #467

Open
maciej-baruch opened this issue Jul 23, 2023 · 2 comments · May be fixed by #468
Open

Remotes under different name #467

maciej-baruch opened this issue Jul 23, 2023 · 2 comments · May be fixed by #468

Comments

@maciej-baruch
Copy link

maciej-baruch commented Jul 23, 2023

Is your feature request related to a problem? Please describe.

Webpack's MF plugin supports using a modified name of a remote module. This is something I've been missing since I do not always intend to refer the remote module using its original name.
What is more, I believe this will help us introduce dynamic/deferred modules resolution - the dynamic modules still have to be 'stubbed' in the config. In webpack this is possible by providing just the name without the full url, which can be supplied at a later time.

Describe the solution you'd like

The idea I came up with is to simply extend remotes configuration object with optional externalName, which would have to be the same name as the module's name in the host's config. Doing so would allow us to modify the id (config item key) of the module.

Describe alternatives you've considered

The way webpack deals with the problem:

altModuleName: 'origModuleName@http://localhost:3001/remoteEntry.js',

However, I am not certain it would be a great idea to introduce '@' support without bumping the major version up (as it could potentially be a breaking change - I know '@' is restricted but I cannot be sure if people do not somehow use it in the URLs).

If you would rather go with '@', I am open to changing my solution.

@maciej-baruch maciej-baruch linked a pull request Jul 23, 2023 that will close this issue
10 tasks
@Zara603
Copy link

Zara603 commented Aug 3, 2023

that's a great fix, I have similar problem

@PIMBA
Copy link

PIMBA commented Feb 21, 2024

I have similar problem too, any news?

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

Successfully merging a pull request may close this issue.

3 participants