How to deploy a React Application to Firebase?
yarn create react-app example-app
and
cd example-app
npm install -g firebase-tools
firebase login
Sample name "furkan-uyanik" for me.
npm run build
or
yarn build
firebase init
() Database ( ) Firestore ( ) Functions (*) Hosting ( ) Storage ( ) Emulators
- Please select an option: (Selected -> Use an existing project)
- Select a default Firebase project for this directory: (Selected -> furkanuyanik-1234)
- What do you want to use as your public directory: build
- Configure as a single-page app (rewrite all urls to /index.html)? (y/N) : No
- File build/index.html already exists. Overwrite? (y/N) : No
firebase deploy