module-federation / practical-module-federation

76 stars 23 forks source link

Is there a way to expose named export? #10

Closed snnsnn closed 4 years ago

snnsnn commented 4 years ago

Hi, thank you for the great work. I was wondering if there is a way to expose named exports?

jherr commented 4 years ago

Named exports are supported natively. Just import and destructure as normal. For asynchronous imports inspect the module that is returned and you'll see your named exports instead of or in addition to default.