title: Importing node modules from root directory using es6 and babel-node
body: <p>I'm writing a node app with es6 using babel transpiler.</p>
  
  <p>I have 2 files <code>index.js</code> &amp; <code>my-module.js</code> on my root directory</p>
  
  <pre><code>- index.js
  - my-module.js
  </code></pre>
  
  <p>my-module.js</p>
  
  <pre><code>export let myFunc = () =&gt; {
    console.log('myFunc was called!!!');
  }
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>import {myFunc} from './my-module';
  myFunc();
  </code></pre>
  
  <p>if I run the following line from the command line everything works as expected.</p>
  
  <pre><code>$ babel-node index.js &gt;&gt; myFunc was called!!!
  </code></pre>
  
  <p>but if I remove the dot when importing my-module:</p>
  
  <pre><code>import {myFunc} from '/my-module';
  myFunc();
  </code></pre>
  
  <p>I'm getting an error: </p>
  
  <pre><code>Error: Cannot find module '/my-module'
  </code></pre>
  
  <p>Any reason why I can't import modules using an absolute path? anyway to change .babelrc config to support it?</p>
  
  <p>Thanks</p>