Webpack-dev-server serving in different folder than webpack output
<p>This is in my <code>webpack.config.js</code>: </p>

<pre><code>var path = require('path');
module.exports = {
  entry: './src/index.jsx',
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: 'bundle.js'
  },
  devServer: {
    inline: true,
    port: 8080
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel',
        query: {
          presets: ['es2015', 'react']
        }
      }
    ]
  }
}
</code></pre>

<p>And this is how I run it:</p>

<pre><code>$ webpack-dev-server --watch-poll --progress --colors
$ webpack --progress --colors
</code></pre>

<p>The problem I'm having is that <code>webpack-dev-server</code> is serving the bundle file at the root of my folder (not on the <code>build</code>) folder how I would expect. But <code>webpack</code> outputs the bundle file to <code>build/</code> (how I expect) to.</p>

<p>So I have to change the <em>script scr</em> when I do a build.</p>

<p>Is there a way to solve that? Maybe is just bad configuration on my <code>webpack.config.js</code>.</p>

<p>I'm running ubuntu BTW.</p>