-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modules are written as CommonJS modules in flow lib: material-ui_v1.x.x #1859
Comments
It shouldn't make a difference, from what I've seen... have you tried changing the libdef locally to see if it fixes the problem? |
I ran into this also. It's an old issue, but I think the problem is specifically attempting to use CommonJS syntax to define a I tested this theory by doing three things:
So it would seem we don't necessarily need ES6 syntax across the board, just when a default export is used in addition to named exports. |
@Benjamin-Dobell would you be willing to write that up with a couple concise examples for our README? I'm sure other people would find this very helpful. |
I fixed this in my PR #2009 |
For example the module def for Card are written as
Which creates problems if i try to import the Card component like this:
When using the Card Component i get error:
Shouldn't modules in the libdef be defined as ES modules like this:
Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: