I\'m writing a \"class\" in node
// mymodule/index.js function MyClass() {} MyClass.prototype.method1 = function() {..}
usually I do
Both ways are correct, but try to import in es6 like this without the brackets:
import MyClass from 'mymodule'
Otherwise you would have to export your function like this:
module.exports.MyClass = MyClass
and than import it like this:
import { MyClass } from 'mymodule'