text: const webpack = require('webpack');
  const path = require('path');
  var CopyWebpackPlugin = require('copy-webpack-plugin');
  
  module.exports = (env) => {
      return {
          entry: {
              app: './src/index.js',
              vendor: ['react', 'react-dom']
          },
          output: {
              path: path.join(__dirname, './dist'),
              filename: '[name].bundle.js'
          },
          module: {
              rules: [
                  {
                      test: /\.html$/,
                      exclude: /node_modules/,
                      use: {
                          loader: 'file-loader',
                          options: {
                              name: '[name].[ext]'
                          }
                      }
                  },
                  {
                      test: /\.css$/,
                      exclude: /node_modules/,
                      use: [
                          'style-loader',
                          'css-loader',
                          'postcss-loader'
                      ]
                  },
                  {
                      test: /\.scss$/,
                      exclude: /node_modules/,
                      use: [
                          'style-loader',
                          'css-loader',
                          'postcss-loader',
                          'sass-loader'
                      ]
                  },
                  {
                      test: /\.(js|jsx)$/,
                      exclude: /node_modules/,
                      use: [
                          'babel-loader'
                      ]
                  }
              ]
          },
          resolve: {
              extensions: ['.js', '.jsx'],
              modules: [
                  path.resolve(__dirname, 'node_modules'),
                  path.join(__dirname, './src')
              ]
          },
          plugins: [
              new CopyWebpackPlugin([{ from: './assets/', to: 'assets' }])
          ],
          devServer: {
              historyApiFallback: true
          },
          node: {
              console: true,
              fs: 'empty',
              net: 'empty',
              tls: 'empty'
          }
      };
  };