title: How to create multi output files?
body: <p>I would like to bundle my chrome extension with Webpack. The source consists multiple entries and the content of the <code>webpack.config.js</code> looks as follows:</p>
  <pre><code>const path = require(&quot;path&quot;);
  
  module.exports = {
    entry: {
      actions: './src/actions/index.js',
      options: './src/options/index.js'
    },
    output: {
      filename: '[name].js',
      path: path.resolve(__dirname, &quot;dist&quot;)
    }
  };
  </code></pre>
  <p>And folder structure:<br />
  <a href="https://i.stack.imgur.com/TmK7q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmK7q.png" alt="enter image description here" /></a></p>
  <p>The <code>actions/index.js</code> and <code>options/index.js</code> files are entries.
  My goal is, when the <code>src</code> get bundled then <code>dist</code> folder should looks as follows:</p>
  <p><a href="https://i.stack.imgur.com/TqZsn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TqZsn.png" alt="enter image description here" /></a></p>
  <p>How to configure the webpack config to get the desired folder structure above?</p>
  <p>Thanks</p>