title: AWS Lambda + Serverless, where/how to deploy js module that couldn't be bundled?
body: <p>I have an Angular 8 + Universal (SSR) + Serverless app. Unfortunately it's still using some firebase functionality. I can't bundle firebase when building my project, I have tu exclude it in webpack config here:</p>
  
  <pre><code>  externals: [
      /^firebase/
    ],
  </code></pre>
  
  <p>Now how do I provide/add this dependency so that my function works?</p>
  
  <p>In its current state, the app: </p>
  
  <ul>
  <li>works using <code>ng serve</code> </li>
  <li>works as statically hosted </li>
  <li>works served
  as SSR with the local server</li>
  <li>works through <code>serverless-offline</code>
  plugin</li>
  </ul>
  
  <p>It's only when actually deployed to lambda that I get the error:</p>
  
  <pre><code>{
      "errorType": "Runtime.ImportModuleError",
      "errorMessage": "Error: Cannot find module 'firebase/app'",
      "stack": [
          "Runtime.ImportModuleError: Error: Cannot find module 'firebase/app'",
          "    at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
          "    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
          "    at Object.&lt;anonymous&gt; (/var/runtime/index.js:36:30)",
          "    at Module._compile (internal/modules/cjs/loader.js:776:30)",
          "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)",
          "    at Module.load (internal/modules/cjs/loader.js:653:32)",
          "    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
          "    at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
          "    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)",
          "    at startup (internal/bootstrap/node.js:283:19)"
      ]
  }
  </code></pre>
  
  <p>How could I go about adding this dependency in aws lambda?</p>