text: const webpack = require('webpack');
  const path = require('path');
  const pkg = require('./package.json');
  
  let libraryName = pkg.name;
  
  let outputFile, mode;
  
  
  const config = {
    mode: mode,
    entry: __dirname + '/src/index.js',
    devtool: 'inline-source-map',
    output: {
      path: __dirname + '/lib',
      filename: outputFile,
      library: libraryName,
      libraryTarget: 'umd',
      umdNamedDefine: true,
      globalObject: "typeof self !== 'undefined' ? self : this"
    },
    module: {
      rules: [
        {
          test: /(\.jsx|\.js)$/,
          loader: 'babel-loader',
          exclude: /(node_modules|bower_components)/
        },
        
      ]
    },
    resolve: {
      modules: [path.resolve('./node_modules'), path.resolve('./src')],
      extensions: ['.json', '.js']
    }
  };
  
  module.exports = config;