"export class MyClass doesn’t work for nodejs. I have to use the module.exports keyword"
Yes, seems like ES modules are experimental in node 10.
They have to be manually activated with the --experimental-modules command line parameter and the module needs the .mjs extension :(
--experimental-modules
.mjs
You can now use the esm module from Dalton to assist with this. "npm init esm"
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"export class MyClass doesn’t work for nodejs. I have to use the module.exports keyword"
Yes, seems like ES modules are experimental in node 10.
They have to be manually activated with the
--experimental-modules
command line parameter and the module needs the.mjs
extension :(You can now use the esm module from Dalton to assist with this. "npm init esm"