text: const HtmlWebpackPlugin = require('html-webpack-plugin');
  const path = require('path');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  const webpack = require('webpack');
  
  const name = 'attr-helpers';
  
  module.exports = {
    devServer: {
      contentBase: path.resolve(__dirname, '.'),
      hot: true,
    },
    devtool: 'source-map',
    entry: {
      [`${name}.bundled`]: path.resolve(__dirname, 'dist', `${name}.js`),
      [`${name}.min`]: path.resolve(__dirname, 'dist', `${name}.js`),
    },
    output: {
      filename: '[name].js',
      path: path.resolve(__dirname, 'dist'),
    },
    plugins: [
      new UglifyJsPlugin({
        include: /\.min\.js$/,
        parallel: true,
        sourceMap: true,
        uglifyOptions: {
          ecma: 7,
        },
      }),
      new HtmlWebpackPlugin({
        filename: 'index.html',
        template: 'index.html',
        chunks: [`${name}.bundled`],
      }),
      new webpack.NamedModulesPlugin(),
      new webpack.HotModuleReplacementPlugin(),
    ],
    resolve: {
      extensions: ['.js'],
    },
  };
  