// @ts-check

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
  entry: {
    App: ['babel-polyfill', './App.jsx']
  },

  output: {
    path: path.join(__dirname, 'build'),
    filename: '[name].js'
  },

  plugins: [
    new MiniCssExtractPlugin({filename: '[name].css'})
  ],

  resolve: {
    extensions: ['.js', '.jsx']
  },

  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        options: {
          presets: ['env', 'react'],
          plugins: [require('babel-plugin-transform-class-properties')]
        }
      },
      { test: /\.js$/, loader: 'source-map-loader' },
      { test: /\.(html|css|png)$/, loader: 'file-loader', options: {name: '[path][name].[ext]'} },
      {
        // FIXME Don't know how to make source maps work
        // See SourceMap not working with Webpack 4.8.1 https://github.com/webpack-contrib/mini-css-extract-plugin/issues/141
        test: /\.scss$/,
        use: [
          MiniCssExtractPlugin.loader,
          { loader: 'css-loader', options: {sourceMap: true} },
          { loader: 'sass-loader', options: {sourceMap: true} }
        ]
      }
    ]
  }
};

@@ -145,27 +145,8 @@
 App:
- %5B'babel-polyfill',
  './
@@ -149,25 +149,24 @@
  './App.jsx'
-%5D
 %0A  %7D,%0A%0A  out
@@ -536,22 +536,226 @@
 s: %5B
-'env', 'react'
+%0A            %5B'env', %7B%0A              targets: %7B%0A                browsers: %5B'%3E 1%25', 'IE %3E= 10'%5D%0A              %7D,%0A              useBuiltIns: true,%0A              debug: true%0A            %7D%5D,%0A            'react',%0A          
 %5D,%0A 

Fix Bootstrap4 example polyfills