core
core copied to clipboard
Add support for eager "exposed" modules
Clear and concise description of the problem
There's no way to mark exposed modules as eager and having the ability to load them synchronously.
Suggested solution
Shared modules can be marked as eager in the shared config thus adding the ability to load them synchronously.
Internally eager shared modules are added to the remote entry.
The same can be done for exposed modules.
The only caveat is that if the exposed module imports a shared module, then that module also has to be marked as eager, otherwise one will get the error:
Uncaught Error: Shared module is not available for eager consumption
Alternative
The only workaround I have found is to also "share" the exposed module and then mark the shared module as eager. But this has the unwanted side effect of having that module in the shared scope. Additionally exposed modules don't have versions, so having them in the shared scope doesn't make sense.
Additional context
No response
Validations
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.