Include es6 class from external file in Node.js
<p>Say I have a file <code>class.js</code>:</p>

<pre><code>class myClass {
   constructor(arg){
      console.log(arg);
   }
}
</code></pre>

<p>And I wanted to use the <code>myClass</code> class in another file. How would I go about this?<br>
I've tried:<br>
<code>var myClass = require('./class.js');</code><br>
But it didn't work.<br>
I've looked at <code>module.exports</code> but haven't found an example that works for es6 classes.</p>