text: const isDev = process.env.NODE_ENV === 'development'
  
  module.exports = {
    mode: isDev ? 'development' : 'production',
    entry: [
      '@babel/polyfill', // enables async-await
      './client/index.js'
    ],
    output: {
      path: __dirname,
      filename: './public/bundle.js'
    },
    resolve: {
      extensions: ['.js', '.jsx']
    },
    devtool: 'source-map',
    watchOptions: {
      ignored: /node_modules/
    },
    module: {
      rules: [
        {
          test: /\.css$/i,
          use: [
            {loader: 'style-loader', options: {injectType: 'styleTag'}},
            'css-loader'
          ]
        },
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: 'babel-loader'
        }
      ]
    }
  }
  