Sha256: 51e7a24e038a988ba98ebcd00326456e37efc81068840698797950f1fc7ac6d1

Contents?: true

Size: 1.3 KB

Versions: 13

Compression:

Stored size: 1.3 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({
      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

13 entries across 13 versions & 2 rubygems

Version Path
webpacker-3.6.0 package/environments/development.js
optimacms-0.4.3 spec/dummy/node_modules/@rails/webpacker/package/environments/development.js
optimacms-0.4.2 spec/dummy/node_modules/@rails/webpacker/package/environments/development.js
webpacker-3.5.5 package/environments/development.js
webpacker-3.5.3 package/environments/development.js
webpacker-3.5.2 package/environments/development.js
webpacker-3.5.1 package/environments/development.js
webpacker-3.5.0 package/environments/development.js
webpacker-3.4.3 package/environments/development.js
webpacker-3.4.1 package/environments/development.js
webpacker-3.4.0 package/environments/development.js
webpacker-3.3.1 package/environments/development.js
webpacker-3.3.0 package/environments/development.js