-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Enable es6 import in Node.js #17
Comments
Why not just use import { AceBase } from 'acebase'; |
|
This is using |
I'm not able to reproduce? |
Apparently this is possible since Node v14.13.0, see this tweet, or this blog post about it: Node.js now supports named imports from CommonJS modules, but what does that mean? |
I am using 14.7.0 which works fine with es6 modules. I've just updated to 15.11.0 and import works now. Whether you want to try and support older versions of Node is a question for you.😀 Did you notice my discussion post: #13 |
Sorry, didn't see the discussion earlier. Somehow the GitHub notification emails are not always getting through... AceBase supports older Node versions, I haven't checked it but should at least be compatible back to version 7. If I switch to using ES modules, that would mean dropping support for older Node versions. And with the Node team already having fixed mixing CommonJS / ES modules, I'd say "don't fix it if it ain't broken"! 😄 |
I'm writing all my Node.js code using es6 import's however AceBase currently needs the following hack for import to work.
The text was updated successfully, but these errors were encountered: