title: How to specify an output filename with the Webpack CLI?
body: <p>I want to create a <strong>file</strong> named <code>background.js</code> inside my <code>build</code> folder. This is the command I use:</p>
  <pre><code>webpack --mode production ./src/background -o ./build/background.js
  </code></pre>
  <p>But this creates a <strong>folder</strong> named <code>background.js</code> inside my build folder. I didn't find any other flag on the <a href="https://webpack.js.org/api/cli/" rel="nofollow noreferrer">webpack-cli documentation</a>. So how do I specify an output filename with the Webpack CLI?</p>