title: Webpack conditional require
body: <p>I'm writing an isomorphic Key Value Store with webpack.</p>
  
  <p>This is currently my approach to load the libraries, which obviously doesn't work, because webpack wants to resolve both <code>require</code>.
  Whats' the right approach?</p>
  
  <pre><code>var db = null;
  
  if (typeof window === 'undefined') {
      // node context
      db = require('level');
  } else {
      // browser context
      db = require('gazel');
  }
  </code></pre>
  
  <p>I know, that you can provide a <a href="http://webpack.github.io/docs/configuration.html#target">target</a> to webpack.
  But I have no idea how to use that.</p>
  
  <p>Thanks!</p>