-
Notifications
You must be signed in to change notification settings - Fork 146
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
Named exports with export default is not working #182
Comments
Hi @eduardojmatos, Can you create a small repro repo? |
@jdalton yes, for sure! |
I think this is expected behavior of ES modules. Use this to get what you want: export const a = 1;
export const b = 2;
export default a; |
Yep, @tilgovi is right. You're getting the error because you're not exporting the I renamed the files to
However, if the code is changed to @tilgovi's suggestion then it works. |
Just to complement: you might name default exported as import { default as a, b } from './dependency' Or: import a, { b } from './dependency' =) |
@fdaciuk yes, but in this case, the problem was the default export. When I changed the way that I was exporting, even this sample that you explained, did works =D |
Hi folks! First, thanks for this awesome project!
I'm using @std/esm on my app and I have an issue to report.
The sample of the issue is very simple:
This causes this error:
To avoid this I'm removing the
default
option from module:And on this way, all is fine. Do am I losting some thing or this is really an issue?
The text was updated successfully, but these errors were encountered: