Skip to content

Large ES build bundle size for @gomomento/sdk #1478

@lintaonz

Description

@lintaonz

Hi,

Here is my setting:

  • Lambda memory_size: 160M
  • Node.js: v20.0
  • ESBuild: bundle and minify are true

When I use Esbuild Bundle Size Analyzer to analyse my bundle index.js, I notice that @gomomento/sdk significantly increases the size of my Lambda function.

  • @gomomento - 742.3kb
  • goole-protobuf - 246.5kb
  • @grpc - 224.3kb

My final bundle size grows from 620kb to 1.9m. The Lambda initial time is 2.25s (700ms is cold start time).

Question:

Can @gomomento/sdk be modularized like AWS SDK v3? For example, I use cache only. Can I exclude any modules related to topic etc?

Cheers,

Tao

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions