Sha256: 09e27af4ae4771ff0f24ca6fd5ed1b47b0f9f32f6a5e2adf9106b7615a313e4d

Contents?: true

Size: 1.35 KB

Versions: 4

Compression:

Stored size: 1.35 KB

Contents

const webpack = require('webpack')
const Base = require('./base')
const devServer = require('../dev_server')
const { outputPath: contentBase, publicPath } = require('../config')

module.exports = class extends Base {
  constructor() {
    super()

    if (devServer.hmr) {
      this.plugins.append('HotModuleReplacement', new webpack.HotModuleReplacementPlugin())
      this.plugins.append('NamedModules', new webpack.NamedModulesPlugin())
      this.config.output.filename = '[name]-[hash].js'
    }

    this.config.merge({
      mode: 'development',
      cache: true,
      devtool: 'cheap-module-source-map',
      output: {
        pathinfo: true
      },
      devServer: {
        clientLogLevel: 'none',
        compress: devServer.compress,
        quiet: devServer.quiet,
        disableHostCheck: devServer.disable_host_check,
        host: devServer.host,
        port: devServer.port,
        https: devServer.https,
        hot: devServer.hmr,
        contentBase,
        inline: devServer.inline,
        useLocalIp: devServer.use_local_ip,
        public: devServer.public,
        publicPath,
        historyApiFallback: {
          disableDotRule: true
        },
        headers: devServer.headers,
        overlay: devServer.overlay,
        stats: {
          errorDetails: true
        },
        watchOptions: devServer.watch_options
      }
    })
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webpacker-4.0.0.rc.1 package/environments/development.js
webpacker-4.0.0.pre.3 package/environments/development.js
webpacker-4.0.0.pre.pre.2 package/environments/development.js
webpacker-4.0.0.pre.pre.1 package/environments/development.js