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

ModuleFederationPlugin does not pass down options.shareScope to ContainerPlugin #13797

Closed
jacobp100 opened this issue Jul 15, 2021 · 6 comments
Closed

Comments

@jacobp100
Copy link

jacobp100 commented Jul 15, 2021

Bug report

ModuleFederationPlugin does not pass down options.shareScope to ContainerPlugin

In these lines,

new ContainerPlugin({
name: options.name,
library,
filename: options.filename,
runtime: options.runtime,
exposes: options.exposes
}).apply(compiler);
, options.shareScope is not passed down, even though ContainerPlugin accepts this.

What is the current behavior?

nil

If the current behavior is a bug, please provide the steps to reproduce.

nil

What is the expected behavior?

Either it should be passed down, or an additional option under a separate name to pass down (i.e. containerShareScope)

Other relevant information:
webpack version: 5.44.0
Node.js version: v14.15.1
Operating System: macOS Big Sur
Additional tools: nil

@alexander-akait
Copy link
Member

Because it is different options? ContainerPlugin is low level api.

@jacobp100
Copy link
Author

@alexander-akait If I'm not mistaken, shared scopes don't work without passing this down to the container plugin. If share scope considered low level, maybe it should be taken out of ModuleFederationPlugin.

@alexander-akait
Copy link
Member

Please provide how we can reproduce the problem?

@jacobp100
Copy link
Author

@alexander-akait Please see repo https://github.com/jacobp100/webpack-13797. Please let me know if you have further questions.

@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

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

Successfully merging a pull request may close this issue.

3 participants