text: const webpack = require('webpack');
  const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
  
  module.exports = () => {
      return {
          entry: { 'create-hintrc': './src/index' },
          externals: {
              browserslist: 'commonjs browserslist',
              encoding: 'commonjs encoding'
          },
          mode: 'production',
          module: {
              rules: [
                  {
                      test: /\.ts$/,
                      use: [{
                          loader: 'ts-loader',
                          options: { configFile: 'tsconfig-webpack.json' }
                      }]
                  }
              ]
          },
          node: {
              __dirname: false,
              __filename: false
          },
          output: { filename: 'src/[name].js' },
          plugins: [
              new ForkTsCheckerWebpackPlugin(),
              new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
              // We set process.env.webpack becase there are different code paths if we are bundling around loading resources
              new webpack.DefinePlugin({ 'process.env.webpack': JSON.stringify(true) }),
              new webpack.ProgressPlugin()
          ],
          resolve: {
              extensions: ['.ts', '.js', '.json'],
              fallback: {
                  path: 'path-browserify',
                  process: false
              }
          },
          target: 'node'
      };
  };
  