My Node lambda is a fairly small function in terms of what it does/lines of code. yet somehow is sitting at 18mb in size. I think this might be due to me installing firebase and it being quite a big package.
I was wondering if there was a way to reduce it?
I did have const firebase = require('firebase') but now I changed it to:
const firebase = require('firebase/app')
but when I zip the lambda up I can still see lines this like:
adding: node_modules/firebase/messaging/dist/ (stored 0%)
adding: node_modules/firebase/messaging/dist/index.cjs.js.map (deflated 20%)
adding: node_modules/firebase/messaging/dist/index.cjs.js (deflated 3%)
which looks like it's still adding the messaging package for some reason?
is there a way to reduce this lambda as I think 18mb is pretty big