2
4 Comments

ReactJS ultra slow prod build (25 minutes)

The ReactJS production build takes about 25 minutes to build on my VPS with 2 GB of memory. What is that?!?

Do I need to switch to a better server? What VPS configs are you using for serving react applications on production?

#programming #javascript #reactjs

posted to Icon for group Developers
Developers
on September 3, 2022
  1. 2

    If you’re using Webpack try a newer builder like SWC.
    This still sounds long though even for Webpack so it might be a poor quality VPS with slow IO or something. At work we’re using Webpack 5 still and even our largest frontend app only takes ~3 mins to build on a GitHub runner.

  2. 1

    Do you run npm install? I would check how long it takes to download you dependencies first.

  3. 1

    What sort of React app is it?

    How long does it take to compile locally?

    1. 1

      Actually it's simple and for local development & even testing the prod build locally, it works fast, maximum a few minutes for the prod build.

  4. 1

    This comment was deleted 3 years ago.

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 41 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 22 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 20 comments Codenhack Beta — Full Access + Referral User Avatar 20 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 13 comments