-
-
Notifications
You must be signed in to change notification settings - Fork 374
fix(enhanced): plugin failure when federation runtime is unused #2324
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
Conversation
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| '])', | ||
| Template.indent( | ||
| runtimePLuginNames.map( | ||
| (item) => `${item} ? ${item}() : false,`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like this?
this.options.plugins = this.options.plugins.reduce((res, plugin) => {
if(!plugin) return res;
if (res && !res.find((item) => item.name === plugin.name)) {
res.push(plugin);
}
return res;
}, pluginRes || []);
```There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's nice
adcb89f to
0fea9d2
Compare

Description
If a runtime chunk has entrypoints which do not contain runtime plugins or they are tree shaken, startup will fail
Related Issue
#2343
Resolves problem like this:
Types of changes
Checklist