-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Importing both named and default from same file not working. #6915
Comments
Hey @frontendmonster! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
mongoose has only a default export, not named exports (which are the equivalent of doing |
@nicolo-ribaudo Ok, but why |
Hmm, this is a pain. The So if you only have a named export, we don't bother using our We can leave this open so we can track it, but my recommendation would absolutely be to do
when you need the schema. ES6 import statements are not destructuring statements. This behavior may yet change more for Babel 7, we haven't fully decided yet. |
I'm tempted to mark this as cc @vkarpov15 (I'm pinging you because by looking at mongoose's commits you are the main maintainer). |
@nicolo-ribaudo I agree, statements like |
bug report:
after upgrading to v7.0, ES6 import seems weird.
importing both named and default from file seems not working right.
named imports become undefined when adding default import on same file.
Input Code
but it works when removing default import.
Babel/Babylon Configuration (.babelrc, package.json, cli command)
Expected Behavior
Current Behavior
Your Environment
Edit
it just happens with mongoose. but when i downgrade babel it fixed.
The text was updated successfully, but these errors were encountered: