text: const path = require('path');
  const webpack = require('webpack');
  const CopyPlugin = require('copy-webpack-plugin');
  
  module.exports = {
    mode: 'production',
    entry: './index.js',
    output: {
      path: path.resolve(__dirname, 'lib'),
      filename: 'main.js',
      library: 'use-simple-state',
      libraryTarget: 'umd',
      umdNamedDefine: true
    },
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /(node_modules|bower_components)/,
          use: {
            loader: 'babel-loader',
            options: {
              plugins: ['@babel/plugin-proposal-class-properties']
            }
          }
        }
      ]
    },
    plugins: [new CopyPlugin([{ from: './index.d.ts', to: './main.d.ts' }])],
    externals: {
      react: {
        root: 'React',
        commonjs2: 'react',
        commonjs: 'react',
        amd: 'react',
        umd: 'react'
      }
    }
  };
  