question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package individually doesn't optimise package size

See original GitHub issue

Hello! This plugin works great, thank you for sharing it!

I wanted to test, if it works for our use case and I’ve found some problems.

We are using Yarn as package manager with workspaces enabled. In the stack that I’m testing, we are having 4 lambda functions. When I was using Webpack, each lambda had different package size, where the smallest was 1.5 MB and the biggest was 3 MB.

However when I was experimenting with this plugin, it looks like, package individually option doesn’t work. The package size is 6 MB for each lambda, which equals the size of package, that is created when package individually is disabled.

I was looking a little bit into the source code and it looks like, package individually option is handled by this plugin. Is this expected behaviour of esbuild? This is the config that I’m using:

custom:
  esbuild:
    packager: yarn
    bundle: true
    minify: true
    sourcemap: true
    keepNames: true

Versions: “serverless-esbuild”: “1.5.1” “serverless”: “2.3.0” Node.js v12.19.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
PatrykMilewskicommented, Feb 26, 2021

I just tested it and it works great! Thank you @olup for fixing this issue!

1reaction
floydspacecommented, Feb 26, 2021

🎉 This issue has been resolved in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing Your Product Packaging: 5 Factors You Need to ...
Palletizing packages for larger volumes before transporting limits the movement of individual packages and makes loading and unloading easier.
Read more >
Packaging - Serverless Framework
To enable individual packaging set individually to true in the service or function wide packaging settings.
Read more >
Doing advanced optimization to further reduce your app's size
Optimize your app's asset files, adopt on-demand resources, and reduce the size of app updates.
Read more >
A cost-efficient method to optimize package size in emerging ...
This research proposes an optimization model to define the minimum total cost combination of outer packs in various distribution channels with ...
Read more >
How to Optimize WooCommerce FedEx Packages for Better ...
Learn to Optimize FedEx Package for Better Shipments.Optimized shipments mean greater ... Sum of length plus girth cannot exceed 130′.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found