const webpack = require('webpack');
const WebpackHtmlPlugin = require('html-webpack-plugin');
const titleCase = require('title-case');

const { name } = require('./package.json');

module.exports = {
  entry: {
    app: ['./src/index.js'],
  },
  output: {
    filename: `${name}.js`,
    library: name,
    libraryTarget: 'umd',
    umdNamedDefine: true,
  },
  module: {
    rules: [
      {
        test: /.js/,
        include: /src/,
        use: ['babel-loader'],
      },
    ],
  },
  plugins: [
    new webpack.DefinePlugin({
      ENV: JSON.stringify('development'),
    }),
    new WebpackHtmlPlugin({
      name,
      title: titleCase(name),
      template: 'index.html',
      inject: false,
    }),
  ],
  devtool: 'source-map',
  performance: {
    hints: false,
  },
};

@@ -212,14 +212,16 @@
     
-app
+%5Bname%5D
 : 
-%5B
 './s
@@ -232,17 +232,16 @@
 ndex.js'
-%5D
 ,%0A  %7D,%0A 
@@ -269,20 +269,19 @@
 me: 
-%60$%7B
+'%5B
 name
-%7D.js%60
+%5D.js'
 ,%0A  
@@ -291,20 +291,24 @@
 ibrary: 
+'%5B
 name
+%5D'
 ,%0A    li

update webpack config to use '[name]'