text: const path = require('path');
  //const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const WebpackMd5Hash = require('webpack-md5-hash');
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  const webpack = require('webpack');
  
  module.exports = {
    entry: { main: './src/index.js' },
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: '[name].[hash].js',
      publicPath: '/',
      chunkFilename: '[name].[chunkhash].js'
    },
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: "babel-loader",
          }
        },
        {
          test: /\.(css|sass|scss)$/,
          use: [  'style-loader', MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader']
        },{
          test: /\.(woff2|woff|eot|ttf|otf)(\?.*)?$/,
          loader: 'url-loader',
          options: {
            limit: 10000,
            name: 'fonts/[name].[hash:7].[ext]',
          }
        }
      ]
    },
    resolve:{
      alias:{
        root:path.resolve(__dirname,'src'),
        utilities:path.resolve(__dirname,'src/utilities'),
      }
    },
    plugins: [
      // new ExtractTextPlugin({
      //   filename: 'style.[hash].css', disable: false, allChunks: true
      // }),
      new webpack.HotModuleReplacementPlugin(),
      new CleanWebpackPlugin('dist', {} ),
      new MiniCssExtractPlugin({
        filename: 'style.[contenthash].css',
      }),
      new HtmlWebpackPlugin({
        inject: false,
        hash: true,
        template: './src/index.html',
        filename: 'index.html'
      }),
      new WebpackMd5Hash()
    ],
    devServer: {
      contentBase: path.join(__dirname, 'dist'),
      port: 3000,
      hot: true,
      inline: true,
      publicPath:'/',
      historyApiFallback: true
    }
  };