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

18th May 2020, 8:20 PM
Alireza Babaei
Alireza Babaei - avatar
3 ответов
+ 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.
18th May 2020, 8:30 PM
Bhavya
Bhavya - avatar
+ 3
It creates a build directory with a production build of the app
18th May 2020, 8:29 PM
Lijo M Loyid
Lijo M Loyid - avatar
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/
18th May 2020, 10:37 PM
Gordon
Gordon - avatar