text: const path = require('path');
  const webpack = require('webpack');
  
  const config = {
    mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
    devtool: 'source-map',
    target: 'web',
  
    entry: {
      bundle: './src/index',
    },
  
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: '[name].js',
      publicPath: './dist/'
    },
  
    plugins: [
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
        'process.env.DEBUG': JSON.stringify(process.env.DEBUG)
      }),
    ],
    module: {
      rules: [
        {
          test: /\.js$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
        }, {
          test: /\.css$/,
          use: [
            'style-loader',
            {
              loader: 'css-loader',
              options: {
                modules: {
                  localIdentName: '[path][name]__[local]--[hash:base64:5]'
                }
              }
            }
          ],
        }, {
          test: /\.png$/,
          loader: 'url-loader'
        },
      ]
    },
  
    resolve: {
      modules: [
        'node_modules'
      ],
  
      extensions: ['.js']
    },
  };
  
  module.exports = config;
  