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.

Hey! Thanks for the package. We spoke a while back on a Slack group and I’m finally getting around to implementing the social image feature. Anyways, my app is deployed to AWS lamdbas and after installing puppeteer-social-image , bundle sizes have gone through the roof. To the point where I can’t deploy using Apex up anymore.

Is there a way I could slim the deps down? Or should I deploy this as a separate service? If so, do you have any recommendations? Cheers!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisvxdcommented, Apr 20, 2020

Have added ^ to docs

1reaction
chrisvxdcommented, Apr 20, 2020

@MrSunshyne Apologies, you’ll want to use puppeteer-serverless to pass a custom puppeteer instance to puppeteer-social image, like so:

import puppeteer from 'puppeteer-serverless';
import renderSocialImage from 'puppeteer-social-image';

export default async () => {
  const body = await renderSocialImage({
    template: '',
    templateParams: {},
    size,
    browser:  await puppeteer.launch({})
  });
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bundlephobia | Size of npm dependencies
Bundlephobia helps you find the performance impact of npm packages. Find the size of any javascript package and its effect on your frontend...
Read more >
Slimming down your bundle size - LogRocket Blog
A critical part for improving frontend performance is to reduce the JavaScript bundle size that should be downloaded via the network.
Read more >
bundlejs - Online bundler + npm package bundle size checker
A quick and easy way to bundle, minify, and compress (gzip and brotli) your ts, js, jsx and npm projects all online, with...
Read more >
5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
4. Compressing Bundles. If your application bundle size increases and affects performance, you can compress them to reduce the size. Gzip and ...
Read more >
Analyze your React app's bundle size and reduce it using ...
As your React app gets larger, you may have to start worrying about its bundle size. An app's bundle size is the amount...
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