feat(react): add remote to tspaths for typing #19276
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Behavior
We currently declare Remote applications in a .d.ts file on the host. This is very limited and does not actually provide any typing or intellisense support.
Expected Behavior
Use TSPaths to allow for typing and intellisense support for remote applications.
This also allows for the remotes to be used in libraries much easier, providing a basis for federating more than just routes and being able to use them across libraries.
Testing tools such as Jest, which do not know or are not built with webpack, are also able to correctly follow the TS Path to find the implementation of the import, meaning there will be no issues with unit testing libraries that use federated modules from remotes.
Related Issue(s)
Fixes #