title: Resolving require paths with webpack
body: <p>I'm still confused how to resolve module paths with webpack. Now I write:</p>
  
  <pre><code>myfile = require('../../mydir/myfile.js') 
  </code></pre>
  
  <p>but I'd like to write</p>
  
  <pre><code>myfile = require('mydir/myfile.js') 
  </code></pre>
  
  <p>I was thinking that <a href="http://webpack.github.io/docs/configuration.html#resolve-alias">resolve.alias</a> may help since I see a similar example using <code>{ xyz: "/some/dir" }</code> as alias then I can <code>require("xyz/file.js")</code>.</p>
  
  <p>But if I set my alias to <code>{ mydir: '/absolute/path/mydir' }</code>, <code>require('mydir/myfile.js')</code>  won't work.</p>
  
  <p>I feel dumb because I've read the doc many times and I feel I'm missing something.
  What is the right way to avoid writing all the relative requires with <code>../../</code> etc?</p>