text: const path = require('path');
  
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  
  module.exports = {
    entry: './src/index.tsx',
    resolve: {
      extensions: ['.ts', '.tsx', '.js']
    },
    output: {
      path: path.join(__dirname, '/dist'),
      filename: '[name].bundle.js'
    },
    devtool: 'inline-source-map',
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          loader: 'awesome-typescript-loader',
          exclude: path.join(__dirname, 'node_modules')
        },
        { test: /.html$/, use: 'raw-loader' },
        { test: /\.json$/, use: 'json-loader' },
        { test:/\.(s*)css$/, use:['style-loader','css-loader', 'sass-loader'] },
        { test: /\.woff(\?.+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
        { test: /\.woff2(\?.+)?$/, use: 'url-loader?limit=10000&mimetype=application/font-woff' },
        { test: /\.ttf(\?.+)?$/, use: 'file-loader' },
        { test: /\.eot(\?.+)?$/, use: 'file-loader' },
        { test: /\.svg(\?.+)?$/, use: 'file-loader' },
        { test: /\.png$/, use: 'url-loader?mimetype=image/png' },
        { test: /\.gif$/, use: 'url-loader?mimetype=image/gif' }
      ],
    },
    optimization: {
      runtimeChunk: false,
      splitChunks: {
        cacheGroups: {
          commons: {
            test: /[\\/]node_modules[\\/]/,
            name: 'vendors',
            chunks: 'all',
          },
          styles: {
            name: 'styles',
            test: /\.css$/,
            chunks: 'all',
            enforce: true,
          },
        },
      },
  },
    plugins: [
      new HtmlWebpackPlugin({
          template: './src/index.html',
          filename: 'index.html',
          showErrors: true,
          title: 'Grunge And Poses',
          path: path.join(__dirname, '../dist/'),
          hash: true
      }),
      new MiniCssExtractPlugin({
          filename: '[name].css',
          chunkFilename: '[id].css',
      }),
    ]
  }