Print
Category: Node JS
Hits: 5152

Step 1 : Eject


npm run eject

This command used to moves create-react-app's  configuration files and dev/build/<<appname>> scripts into you <<app>> directory.

Note:

To run this command make sure following topics


Step 2: babel's remove-console


Install babel-plugin-transform-remove-console library and make following changes in package.json configuration file

 

npm install babel-plugin-transform-remove-console


"babel": {
"presets": [
"react-app"
],
"plugins": [
"transform-remove-console"
]
}

Step 3: Build ReactJS


Run following command to build ReactJS application to deploy on production.  It will place all the files under a folder "build"

npm run build