Closed tomchiverton closed 1 year ago
Adding this plugin balloons the deploy size.
Take the built .serverless/*.zip and unpack it
Observe the node_modules/* folder sizes. lodash is the biggest consumer at 5 meg
$ npm list -prod -all npm WARN config production Use `--omit=dev` instead. xxxxx@0.1.0 /home/xxxxx/web-site ├─┬ promise-mysql@5.2.0 │ ├── @types/bluebird@3.5.38 │ ├─┬ @types/mysql@2.15.21 │ │ └── @types/node@18.11.11 │ ├── bluebird@3.7.2 │ └─┬ mysql@2.18.1 │ ├── bignumber.js@9.0.0 │ ├─┬ readable-stream@2.3.7 │ │ ├── core-util-is@1.0.3 │ │ ├── inherits@2.0.4 │ │ ├── isarray@1.0.0 │ │ ├── process-nextick-args@2.0.1 │ │ ├── safe-buffer@5.1.2 deduped │ │ ├─┬ string_decoder@1.1.1 │ │ │ └── safe-buffer@5.1.2 deduped │ │ └── util-deprecate@1.0.2 │ ├── safe-buffer@5.1.2 │ └── sqlstring@2.3.1 ├─┬ serverless-aws-static-file-handler@4.0.1 │ ├── lodash@4.17.21 │ ├─┬ mime-types@2.1.35 │ │ └── mime-db@1.52.0 │ └── mustache@4.2.0 └── yesql@5.0.0 $ cd .serverless ... unzip *zip ... $ cd */node_modules $ du -skh *|sort -h| tail -n 2 724K bluebird 5.0M lodash
As far as I can see _.get() is the only thing used from all of lodash, it could be replaced with own impl.
_.get()
serverless-aws-static-file-handler@4.0.1 node 18 Ubuntu 22.04 LTS
Love it! I'll help get this through!!
:tada: This issue has been resolved in version 4.0.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Adding this plugin balloons the deploy size.
Take the built .serverless/*.zip and unpack it
Observe the node_modules/* folder sizes. lodash is the biggest consumer at 5 meg
As far as I can see
_.get()
is the only thing used from all of lodash, it could be replaced with own impl.serverless-aws-static-file-handler@4.0.1 node 18 Ubuntu 22.04 LTS