title: serverless-webpack Cannot find module './node/NodeTemplatePlugin'
body: <p>I'm trying to use the <a href="https://github.com/elastic-coders/serverless-webpack" rel="nofollow noreferrer">serverless-webpack plugin</a>, and while running webpack alone works just fine, attempting to run serverless-webpack fails with <code>Cannot find module './node/NodeTemplatePlugin'</code>.</p>
  <p>My serverless.yml file is as follows:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>service: kamehameha
  
  provider:
    name: aws
    runtime: nodejs6.10
  
  functions:
    getDeltas:
      handler: bundle.getDeltas
  
  plugins:
    - serverless-webpack</code></pre>
  </div>
  </div>
  </p>
  <p>And my webpack config is as follows:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>let path = require("path")
  let webpack = require("webpack")
  let nodeExternals = require("webpack-node-externals")
  
  module.exports = {
    entry: "./src/index.re",
    target: "node",
    node: {
      __dirname: true,
    },
    externals: [nodeExternals()],
    output: {
      path: __dirname,
      filename: "bundle.js",
    },
    module: {
      loaders: [
        {
          test: /\.re$/,
          loader: "bs-loader",
        },
      ],
    },
    resolve: {
      extensions: [".re", ".ml", ".js"],
    },
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Webpack alone compiles the reason file into bundle.js, however serverless-webpack runs with the aforemention error.</p>
  <p>I'm trying to use the plugin because compiling and deploying alone causes a lambda error where it cannot find the handler.</p>
  <p>I've tried removing the global webpack installation and using only the local one, as well as with serverless. Has anyone encountered something similar?</p>
  <p>Thanks!</p>