October 22, 2024
Chicago 12, Melborne City, USA
HTML

How to optimize LCP in React + Webpack 5


I’m woking on a React (v18) project in a Microfrontend architecture with Single-SPA and Wepack 5.

I’m running Lighthouse on localhost and I get that the LCP takes too much and that the render is over 95% of the total time.

I’ve tried all sorts of things to improve this to no avail: I’ve implemented webpack plugins, code-splitting all my dependencies and react lazy loading. Doing this the score improved generally speaking, but I don’t understand how to approach the LCP optimization. I don’t seem to find much information online, and books are a bit outdated.

I would appreciate any guidance and resources on improving this issue.

LCP



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video