module-federation/vite

default exports from pathed dependencies

husayt opened this issue · 2 comments

Until this fix i had to add .default
to use any default exports from shared libraries.

import Lib from "sharedLib";

this fix had resolved it.

But if my shared library is like this

  "@material-ui/core/Grid": { singleton: true },

and I import it like this

import Grid from "@material-ui/core/Grid";

then i still have to add .default to get default out

 return (
 <Grid.default> </Grid.default>
 return (

The need for explicit .default is a bug

I understand that what you shared is not a complete npm package. I have never done this before. This scenario really needs to be enhanced.