-2

I wanted to deploy a react project. I used the npm run build command to create a build folder for deployment. Somehow, i dont know where the output ont this build folder is. Can someone explain to me, how i should proceed?

crvxッ
  • 60
  • 7
  • You just have to upload all the content inside the build directory to the public folder of your hosting account. If you are using shared hosting account, it would be public_html directory. – Dulaj Ariyaratne Oct 21 '22 at 07:09
  • If I have this build folder, do I need to add it to my web server or how should I go about it? – crvxッ Oct 21 '22 at 07:14
  • You have to add all the content inside the build folder to your web server public_html directory. – Dulaj Ariyaratne Oct 21 '22 at 07:17

1 Answers1

0

npm run build or yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed.

  • I've done this already. I got an build folder with some json files. If i add them to the directory of my webserver it didnt worked. Is it normal that the build output is mostly json files? – crvxッ Oct 21 '22 at 08:12