text: const path = require('path');
  const autoprefixer = require('autoprefixer');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  const Dotenv = require('dotenv-webpack');
  const CopyWebpackPlugin = require('copy-webpack-plugin');
  
  module.exports = {
      devtool: 'cheap-module-source-map',
      entry: './src/index.js',
      output: {
          path: path.resolve(__dirname, 'dist'),
          filename: 'bundle.js',
          chunkFilename: '[id].js',
          publicPath: '/'
      },
      resolve: {
          extensions: ['.js', '.jsx']
      },
      module: {
          rules: [
              {
                  test: /\.js$/,
                  loader: 'babel-loader',
                  exclude: /node_modules/
              }, 
              {
                  test: /\.css$/,
                  exclude: /node_modules/,
                  use: [
                      {
                          loader: 'style-loader'
                      },
                      {
                          loader: 'css-loader',
                          options: {
                              importLoaders: 1,
                              modules: true,
                              localIdentName: '[name]__[local]__[hash:base64:5]'
                          }
                      },
                      {
                          loader: 'postcss-loader',
                          options: {
                              ident: 'postcss',
                              plugins: () => [
                                  autoprefixer({
                                      browsers: [
                                          "> 1%",
                                          "last 2 versions"
                                      ]
                                  })
                              ]
                          }
                      }
                  ]
              },
              {
                  test: /(png|jpe?g|gif)$/,
                  loaders: 'url-loader?limit=8000&name=assets/[name].[ext]'
              }
          ]
      },
      plugins: [
          new Dotenv(),
          new CopyWebpackPlugin([
              { from: __dirname + '/public/favicon.ico' }
          ]),
          new HtmlWebpackPlugin({
              template: __dirname + '/public/index.html',
              filename: 'index.html',
              inject: 'body'
          })
      ],
      optimization: {
          minimizer: [
              new UglifyJsPlugin()
          ]
      }
  };
  
  