title: Bundle node project using firebase-admin with Webpack
body: <p>I'm trying to bundle a project using firebase-admin which will be then deployed to a back end. Everything worked as expected until I added the firebase-admin library, then deploys started failing with the error <code>ReferenceError: require is not defined</code>, which doesn't make sense since the environment the code is being executed in is Node. I've looked up fixes to this but couldn't find much. Here's my Webpack config:</p>
  <pre><code>module.exports = {
    target: 'node',
    externals: [nodeExternals()],
    mode: 'production',
    entry: './src/index.ts',
    devtool: 'inline-source-map',
    module: {
      rules: [
        {
          test: /\.json$/,
          use: 'json-loader',
          exclude: /node_modules/,
          type: 'javascript/auto'
        },
        {
          test: /\.ts?$/,
          use: 'ts-loader',
          exclude: /node_modules/,
        }
      ],
    },
    resolve: {
      extensions: ['.ts', '.json'],
    },
    output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'lib'),
    },
  };
  </code></pre>
  <p>Any help is greatly appreciated.</p>