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
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.
Do you run npm install? I would check how long it takes to download you dependencies first.
What sort of React app is it?
How long does it take to compile locally?
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.
This comment was deleted 3 years ago.