text: const path = require('path');
  const webpack = require('webpack');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  function getPath(dir) {
    return path.join(process.cwd(), dir);
  }
  
  module.exports = {
    mode: 'development',
    devtool: 'source-map',
    entry: getPath('src/index.tsx'),
    output: {
      publicPath: '/',
      filename: 'js/[name].js',
      path: getPath('dist'),
      chunkFilename: 'js/chunks/[id].js'
    },
    module: {
      rules: [
        {
          test: /\.tsx?$/,
          exclude: /node_modules/,
          loader: 'ts-loader'
        },
        {
          test: /\.(css|less)$/,
          use: [
            { loader: 'style-loader' },
            { loader: 'css-loader', options: { importLoaders: 2 } },
            { loader: 'less-loader' }
          ]
        }
      ]
    },
    resolve: {
      extensions: ['.js', '.ts', '.tsx']
    },
    plugins: [
      new webpack.NamedChunksPlugin(),
      new HtmlWebpackPlugin({
        title: 'TS-DEMO',
        template: getPath('config/index.html')
      })
    ],
    devServer: {
      before: function(app, server) {
        app.get('/some/path', function(req, res) {
          res.json({ c: 0, m: null, r: { custom: 'response' } });
        });
      }
    }
  };
  