text: const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = () => {
    return {
      mode: 'development',
      devtool: 'source-map',
      devServer: {
        port: 8888,
        historyApiFallback: true,
        stats: 'minimal'
      },
      output: {
        //  must specified output.publicPath otherwise
        //  devServer.historyApiFallback will not work
        publicPath: '/'
      },
      resolve: {
        extensions: ['*', '.mjs', '.js', '.jsx']
      },
      module: {
        rules: [
          {
            test: /\.m?jsx?$/,
            exclude: /(node_modules)/,
            use: {
              loader: 'babel-loader'
            }
          }
        ]
      },
      plugins: [
        new HtmlWebpackPlugin({
          title:'React Lab',
          template: 'src/index.html'
        })
      ]
    }
  }
  