Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Usage on lambda@edge - Code size #164

Description

@joeruello

Is your feature request related to a problem? Please describe.

I'm trying to implement feature flagging/bucketing at the CDN edge using lambda@edge. Visitor edge lambdas currently have a size limit of 1MB of code compressed. With this library as my only dependency, node_modules is over 14MB before and just over 4mb after compression.

Describe the solution you'd like
I only really want to use variation calls, reading/generating userId from cookie info. It looks like there's a bunch of extra deps, a bunch of redis stuff, a bunch of json schema stuff + ajv that I'm not really using (I think), a bunch of AWS stuff. Plus, ALL of lodash (Probally something downstream).

It would be great if these could be moved into peer dependencies or another smaller package without all the bells and whistles

Describe alternatives you've considered
I could use the client SDK, but it seems like that would be slower as I would need to talk to LD on every request. I guess I could also look into using rollup/webpack or something and stubbing out the extraneous packages.

Additional context
n/a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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