text: const path = require('path');
  const slsw = require('serverless-webpack');
  
  module.exports = {
    entry: slsw.lib.entries,
    target: 'node',
    mode: slsw.lib.webpack.isLocal ? 'development' : 'production',
    performance: {
      // Turn off size warnings for entry points
      hints: false,
    },
    devtool: 'nosources-source-map',
    resolve: {
      extensions: ['.js', '.json', '.ts', '.tsx'],
    },
    module: {
      rules: [
        {
          test: /\.ts(x?)$/,
          use: [
            {
              loader: 'ts-loader',
              options: {
                // https://github.com/serverless-heaven/serverless-webpack/issues/299
                transpileOnly: true,
              },
            },
          ],
        },
        {
          test: /\.mjs$/,
          type: 'javascript/auto',
        },
      ],
    },
    output: {
      libraryTarget: 'commonjs2',
      path: path.join(__dirname, '.webpack'),
      filename: '[name].js',
      sourceMapFilename: '[file].map',
    },
  };
  