How to Type Lazy Components #453
-
How are we intended to make typescript happy with remote chunks loaded lazy as is suggested in the docs? Using the below code I always get
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @steventnorris, we don't have a nice solution for this atm, #270 is about exactly this issue. Right now you can always type this manually by doing a typecast via |
Beta Was this translation helpful? Give feedback.
-
FYI Module Federation 2 comes with dynamic type generation which should resolve this problem. Support for MF2 is coming in version 5 of Re.Pack |
Beta Was this translation helpful? Give feedback.
Hey @steventnorris,
we don't have a nice solution for this atm, #270 is about exactly this issue. Right now you can always type this manually by doing a typecast via
as NavigationProviderType
and having declaration of that component in your repo