const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')

environment.plugins.append('ConcatPlugin', new ConcatPlugin({
  uglify: true,
  sourceMap: true,
  outputPath: 'js',
  fileName: 'application.bundle.js',
  filesToConcat: [
    'jquery',
    'jquery-ujs',
    'jquery.iframe-transport',
    'dropzone',
    'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
    'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
    'jquery-accessible-accordion-aria',
    'jsrender',
    'jquery-highlight',
    'jquery-throttle-debounce',
    'accessible-autocomplete',
    './app/webpack/javascripts/vendor/**/*',
    './app/webpack/javascripts/modules/**/*',
    './app/webpack/javascripts/plugins/**/*',
    './app/webpack/javascripts/application.js'
  ]
}))

module.exports = environment

const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')

environment.plugins.append('ConcatPlugin', new ConcatPlugin({
  uglify: true,
  sourceMap: true,
  outputPath: 'js',
  fileName: 'application.bundle.js',
  filesToConcat: [
    'jquery',
    'jquery-ujs',
    'jquery.iframe-transport',
    'dropzone',
    'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
    'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
    'jquery-accessible-accordion-aria',
    'jsrender',
    'jquery-highlight',
    'jquery-throttle-debounce',
    'accessible-autocomplete',
    './app/webpack/javascripts/vendor/**/*',
    './app/webpack/javascripts/modules/**/*',
    './app/webpack/javascripts/plugins/**/*',
    './app/webpack/javascripts/application.js'
  ]
}))

environment.config.merge({
  output: {
    filename: 'js/[name]-[hash].js'
  }
})

module.exports = environment

Resolve webpack-dev-server output filename error
Resolve webpack-dev-server output filename error

```
ERROR in chunk [file] [entry]
Cannot use [chunkhash] or [contenthash] for chunk in 'js/[name]-[contenthash].js' (use [hash] instead)
```

Override the base config output filename and resolve the above error in chunk
