title: Webpack variable output path
body: <p>I would like to use variable output paths similar to <a href="https://github.com/webpack/file-loader#filename-template-placeholders" rel="nofollow">file-loader</a> one.</p>
  
  <pre><code>var webpackConfig = {
    context: path.join(__dirname, './app'),
    entry: {
      background: './background/background.js',
      popup: './popup/popup.js'
    },
    output: {
      path: path.join(__dirname, './dist'),
      filename: '[path][name].js'
    },
  };
  </code></pre>
  
  <p>Any clue how to make this work?</p>
  
  <h3>Edit:</h3>
  
  <p>In detail I want the following result.</p>
  
  <pre><code>app/background/background.js 
    -&gt; dist/background/background.js
  
  app/popup/popup.js 
    -&gt; dist/popup/popup.js
  </code></pre>