-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Support Global Plugin Regestration from init #3290
Comments
Send a pull request. |
Great, will dive into it over the weekend |
After discussion with the team. The team would prefer deliberate friction, forcing the user to implement it somewhere else or in the pre-entry phases of the compiler, in their own code, or how i do it - i just register a blank runtime plugin where i use registerGlobalPlugin and just register it anyway as a side-effect of a normal runtime plugin. |
I see, thanks ! |
Sorry man! I Tried! |
All good :) it was nice experimenting with the codebase, see ya in the next PR 🤞 |
Clear and concise description of the problem
Currently the only options to add global plugins are:
registerGlobalPlugins
orwindow.__FEDERATION__.__GLOBAL_PLUGIN__?.push
.There is no option to pass
globalPlugins
toinit
.Suggested solution
Enable passing
globalPlugins
to theinit
runtime function, later to be supported from vite / webpack as well.Example:
Alternative
We can also mark any plugin as
global: true
to be registered globally.Additional context
Willing to take part in the implementation :)
Validations
The text was updated successfully, but these errors were encountered: