0
what does this do?
I saw this on the web but I don't know what is the benefit of this react npm run build
3 Respostas
+ 6
npm stands for node package manager which handles packages for your node.js app.
npm run build will run the script "build" from the package.json scrips field. build is more like a variable name for some script that has been set by the team behind react.
I don't know how react works yet but I know node.js. All this might be confusing but if you want to understand the inner working of npm u need to do some (a lot!) reasearch on node.js, it's awesome.
+ 3
It creates a build directory with a production build of the app
0
Production build is static and hashed. In other words, it has short loading time and more cache efficient, which means higher performance.
https://create-react-app.dev/docs/production-build/