Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Project setup] AADev I see that the core bundler is esbuild, and I can observe the bundle produced #281

Open
April-Bates-Dev opened this issue Sep 14, 2023 · 0 comments
Assignees

Comments

@April-Bates-Dev
Copy link
Collaborator

April-Bates-Dev commented Sep 14, 2023

Postestimated to a 5

The size of some of our lambdas is quite large. It would be useful to better understand what is causing this, and to bundle them better. To do this, we will bundle our lambda code with esbuild rather than tsc.

Staging lambda sizes, as of 14 September.

staging-get-user-lambda
9.8 MB

staging-update-user-lambda
9.9 MB

staging-demo-review-lambda
10.4 MB

staging-review-lambda
1.2 MB

Tech steps:

  • Rerecord the size of the lambdas (you can see the lambda sizes by looking in the console)
  • Swap bundler so we are using esbuild rather than tsc.
  • Use https://esbuild.github.io/analyze/ to analyse the bundles, to get visibility into whether any packages are being bundled when they shouldn't be.
  • Check the new lambda sizes, to see if they are smaller. Create follow up ticket to make edits to the esbuild configuration to make the bundle smaller, as well as using the output of the esbuild analysis to make the package size smaller.

Validation steps:

  • See screenshot of deployed lambdas with size smaller than those listed in event description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Functional Review
Development

No branches or pull requests

1 participant