text: const path = require('path')
  const { CleanWebpackPlugin } = require('clean-webpack-plugin')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  
  module.exports = {
    mode: 'development',
    devtool: 'inline-source-map',
    entry: {
      app: './src/index.js',
    },
    output: {
      filename: 'app.min.js',
      path: path.resolve(__dirname, '../dist'),
      publicPath: '/',
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.html$/,
          use: [
            {
              loader: 'html-loader',
            },
          ],
        },
        {
          test: /\.(css|scss)$/,
          use: [
            'style-loader', // creates style nodes from JS strings
            'css-loader', // translates CSS into CommonJS
            'sass-loader', // compiles Sass to CSS, using Node Sass by default
          ],
        },
      ],
    },
    plugins: [
      new CleanWebpackPlugin(),
      new HtmlWebpackPlugin({
        template: './public/index.html',
        filename: 'index.html',
      }),
    ],
    devServer: {
      contentBase: path.join(__dirname, '../public'),
      compress: true,
      historyApiFallback: true,
    },
    resolve: {
      alias: {
        react: path.resolve('./node_modules/react'),
        '@material-ui/styles': path.resolve('./node_modules/@material-ui/styles'),
        '@material-ui/pickers': path.resolve(
          './node_modules/@material-ui/pickers'
        ),
      },
      extensions: ['.scss', '.jsx', '.js', '.json'],
    },
  }
  