Description
Installing react-scripts
from npm can take a few minutes on a reasonably fast internet connection. Increasing the size of dependencies and making the installation time longer is also something that limits us when considering new features like testing (#331).
What if we pre-built react-scripts
into one executable JS file with webpack, rollup or similar module bundler and published the package to npm with just that file? As all code would be in a single file (instead of 13k+ files currently installed to node_modules
) and that file would presumably be a lot smaller than ~77 MB consumed by the separate packages, I would expect it to be very fast to install.
I think this would solve a huge pain point in development using JS build tools: npm install
takes a lot of time. react-scripts
is a single dependency that solves the basic build tool needs and if it installed very fast, the problem would basically be solved for projects using it.
I don't know how well this would work in practice, it's just an idea at the moment, but I wanted to throw it here for discussion. What do you think? Are there any downsides to bundling the scripts like this?