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

fix(webpack): regression from #10432 to allow // prefix #12302

Merged
merged 1 commit into from
Sep 29, 2022
Merged

fix(webpack): regression from #10432 to allow // prefix #12302

merged 1 commit into from
Sep 29, 2022

Conversation

neo
Copy link
Contributor

@neo neo commented Sep 29, 2022

Current Behavior

Provided ModuleFederationConfig of the following:

  remotes: [
    ['about', '//localhost:4201/'],
    ['cart', '//localhost:4202/'],
    ['shop', '//localhost:4203/'],
  ],

It ends up requesting http://localhost:4200/localhost:4201/remoteEntry.js

image

And I think we shouldn't use path.join because it would normalize the double slash to become single:

$ node -e "console.log(require('path').join('//localhost:4201/', 'remoteEntry.js'))"
> /localhost:4201/remoteEntry.js

Expected Behavior

It should assemble the URL correctly and request http://localhost:4201/remoteEntry.js instead.

Related Issue(s)

I believe it's a regression introduced by #10432 when trying to fix #10206.

@vercel
Copy link

vercel bot commented Sep 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Sep 29, 2022 at 3:47AM (UTC)

@neo neo changed the title fix(webpack): regression from #10432 to allow prefix in remoteLocation fix(webpack): regression from #10432 to allow // prefix Sep 29, 2022
Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉 Thanks for the PR!

@Coly010 Coly010 merged commit ba657da into nrwl:master Sep 29, 2022
FrozenPandaz pushed a commit that referenced this pull request Sep 29, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name of remote module required to be remoteEntry.mjs
2 participants