feat: support external star exports on namespace objects #3474
This replaces the current error with a simple Object.assign expression for the case where a namespace object contains star exports from external modules.
Ideally duplications etc should fail etc, but that seems like overkill - rather the Object.assign just works in the correct order to ensure that local export precedence applies at least. This way valid ES module semantics remain valid, while invalid ES module semantics aren't necessarily caught for the ambiguous cases - the principle SystemJS as a project aims to follow.
Currently the export star searching is only one level deep, so may still have an edge case there - but the implementation carefully throws if that edge case is hit in a way that can be added progressively later.
This PR contains:
Are tests included?
List any relevant issue numbers:
The text was updated successfully, but these errors were encountered:
@@ Coverage Diff @@ ## master #3474 +/- ## ========================================== + Coverage 95.84% 95.92% +0.07% ========================================== Files 174 174 Lines 5902 5911 +9 Branches 1737 1739 +2 ========================================== + Hits 5657 5670 +13 + Misses 126 124 -2 + Partials 119 117 -2