text: const webpack = require('webpack');
  let HtmlWebpackPlugin = require('html-webpack-plugin');
  const path = require('path');
  module.exports = {
    mode: 'development',
    entry: './src/index.tsx',
    output: {
      path: path.join(__dirname, 'dist')
    },
    devtool: 'source-map',
    devServer: {
      contentBase: path.join(__dirname, 'dist'),
      historyApiFallback: {
        index: 'index.html'
      }
    },
    resolve: {
      extensions: ['.ts', '.tsx', '.js', '.json']
    },
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          loader: 'ts-loader'
        },
        {
          enforce: 'pre',
          test: /\.tsx?$/,
          loader: 'source-map-loader'
        },
        {
          test: /\.less?$/,
          use: ['style-loader', 'css-loader', 'less-loader']
        },
        {
          test: /\.(jpg|png|gif|svg)/,
          loader: 'url-loader'
        }
      ]
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: './src/index.html'
      })
    ]
  }