title: How to configure webpack devServer port?
body: <p>I'm trying to use webpack in my Symfony app in docker, but I'm still getting error:</p>
  
  <p><em>GET <a href="http://localhost:8000/sockjs-node/info?t=1556798329924" rel="nofollow noreferrer">http://localhost:8000/sockjs-node/info?t=1556798329924</a> 404 (Not Found)</em></p>
  
  <p>Everything works fine axcepts this error...</p>
  
  <p>App is running on port 8000 and node on port 8081. The address with 8081 port is accessible, but how can I tell webpack to use port 8081 with devServer? </p>
  
  <p>Here is my webpack.config.js:</p>
  
  <pre><code>const Encore = require('@symfony/webpack-encore');
  const StyleLintPlugin = require('stylelint-webpack-plugin');
  
  const outputPath = './public/build/';
  const publicPath = '/build';
  
  Encore
    .setOutputPath(outputPath)
    .setPublicPath(publicPath)
  
    // Clean output dir before build
    .cleanupOutputBeforeBuild()
  
    .splitEntryChunks()
    .enableSingleRuntimeChunk()
  
    // uncomment if you're having problems with a jQuery plugin
    .autoProvidejQuery()
  
    // Generate JS files
    .addEntry('loader', './assets/javascript/loader.js')
    .addEntry('admin-loader', './assets/javascript/admin.js')
  
    // Generate CSS files
    .addStyleEntry('forms', './assets/styles/forms.scss')
    .addStyleEntry('grid', './assets/styles/grid.scss')
    .addStyleEntry('reboot', './assets/styles/reboot.scss')
    .addStyleEntry('styles', './assets/styles/styles.scss')
    .addStyleEntry('utilities', './assets/styles/utilities.scss')
    .addStyleEntry('admin', './assets/styles/admin.scss')
  
    .enableEslintLoader()
    .configureTerserPlugin((options) =&gt; {
      options.cache = true;
      options.parallel = true;
      options.terserOptions = {
        output: {
          comments: false,
        }
      }
    })
  
    .configureSplitChunks((options) =&gt; {
      options.chunks = 'all',
        options.maxInitialRequests = Infinity,
        options.cacheGroups = {
          vendor: {
            test: /[\\/]node_modules[\\/]/,
            name(module) {
              const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
              return `pckg.${packageName.replace('@', '')}`;
            },
          }
        }
    })
  
    // Enable SASS loader with PostCSS config
    .enableSassLoader()
    .enablePostCssLoader()
  
    .enableSourceMaps(!Encore.isProduction())
    .enableVersioning(Encore.isProduction())
  
    // CSS Hot Loader for HMR in webpack dev server
    .addLoader({
      enforce: 'post',
      test: /\.(s?c|sa)ss$/,
      exclude: /node_modules/,
      loader: 'css-hot-loader',
    })
  
    .addPlugin(new StyleLintPlugin({
      lintDirtyModulesOnly: Encore.isProduction(),
      context: './assets/styles/',
      quiet: false,
    }));
  
  const config = Encore.getWebpackConfig();
  
  // Export settings and generate files
  module.exports = config;
  </code></pre>
  
  <p>Does anyone know?</p>