text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
    template: path.join(__dirname, 'demo/src/index.html'),
    filename: './index.html'
  });
  module.exports = {
    entry: path.join(__dirname, 'demo/src/index.js'),
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          use: {
            loader: 'babel-loader'
          },
          exclude: /node_modules/
        },
        {
          test: /\.(scss|css)$/i,
          use: ['style-loader', 'css-loader', 'sass-loader']
        },
        {
          test: /\.svg/,
          use: {
            loader: 'svg-url-loader',
            options: {}
          }
        }
      ]
    },
    plugins: [htmlWebpackPlugin],
    resolve: {
      extensions: ['.js', '.jsx']
    },
    devServer: {
      port: 3001,
      open: true
    },
    devtool: 'source-map',
    output: {
      filename: '[name].[contenthash].js',
      path: path.resolve(__dirname, 'build')
    },
    optimization: {
      splitChunks: {
        chunks: 'all'
      }
    }
  };
  