text: const path = require('path');
  const webpackNodeExternals = require('webpack-node-externals');
  
  module.exports = {
    target: 'node',
    context: __dirname,
    devtool: 'source-map',
    entry: './src/index.ts',
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: 'server.js',
      publicPath: '/dist/',
    },
    module: {
      rules: [
        {
          test: /\.ts$/,
          exclude: /node_modules/,
          include: /src/,
          use: {
            loader: 'ts-loader',
          },
        },
      ],
    },
    resolve: {
      extensions: ['.ts', '.js'],
    },
    externals: [webpackNodeExternals()],
  };
  