-
Hello, What I need (requirements):
Initially I tried serverless-plugin-tree-shake, but it looks outdate, doesn't seem to work with serverless >=3.0 and had some edge case problems. So my question is - what would be the recommended way for me considering the requirements I listed above? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Have the same challenge. Any updates? |
Beta Was this translation helpful? Give feedback.
-
Serverless
Note that the biggest offender these days is the 4MB binary
The first You can get some ideas of what to remove by running your code under strace, tracing I expect decent shakers to be developed one day though :) But this is a workaround that doesn't use any potentially buggy software, and it does help to reduce my tree. Also, you should put your |
Beta Was this translation helpful? Give feedback.
-
serverless-jetpack should tick all your boxes. |
Beta Was this translation helpful? Give feedback.
Hey @samuel-pipelaunch ,
So I've decided to drop that one point "Retain file/directory structure of output (not bundle into one file)", because I couldn't find anything that suited every single of my point and started to use esbuild (retaining the structure could maybe be possible in the future with esbuild though https://esbuild.github.io/api/#splitting). Personally I only deploy lambdas using terraform therefore I decided to drop
serverless
as a whole and created a "function packager" of my own.https://www.npmjs.com/package/funpack (https://github.com/doteric/funpack)
Feel free to use it and report and issues or ideas you have.