text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const pkg = require('./package.json');
  
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
    template: path.join(__dirname, 'playground/src/index.html'),
    filename: './index.html',
  });
  
  module.exports = {
    entry: path.join(__dirname, 'playground/src/index.js'),
    output: {
      path: path.resolve(__dirname, 'lib'),
      filename: "index.js",
      library: pkg.name,
      libraryTarget: "commonjs2"
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          use: 'babel-loader',
          exclude: /node_modules/,
        },
        {
          use: 'file-loader',
          test: /\.(woff(2)?|ttf)(\?v=\d+\.\d+\.\d+)?$/,
        },
        {
          test: /\.(gif|png|jpe?g|svg)$/i,
          use: [
            'file-loader',
            {
              loader: 'image-webpack-loader',
              options: {
                disable: true,
              },
            },
          ],
        },
        {
          test: /\.css$/,
          use: ['style-loader', 'css-loader'],
        },
      ],
    },
    plugins: [htmlWebpackPlugin],
    resolve: {
      extensions: ['.js', '.jsx'],
    },
    devServer: {
      port: 3001,
    },
    devtool: 'source-map',
  };
  