0
votes

I have finished creating a react app using typescript and below is what I did to deploy the app to firebase

  1. yarn build

  2. firebase init

  3. firebase deploy

Now I have pointed the public folder to my build folder as below

"hosting": {
    "public": "build",
    "ignore": [

I am using typescript in the react app

Yet, whenever it deploys I always get a blank page.

What am I doing wrong?

1
Open the browser developer console and refresh the page, what errors do you get? - IMujagic
try to build and serve in your local env first. If the problem accurs, its you can start from there to investigate the root cause. As @IMujagic said, check the browser console and what error you got? - Akza
There's not enough information here to tell what's going wrong. We don't know what's actually in your public folder, and so we can't see the content that you've deployed. You might want to take things a bit slower and learn how Firebase Hosting works without react, then add react to your project when you can get basic static content working. - Doug Stevenson

1 Answers

0
votes

OMG! I'm so sorry guys..It was my bad.The deploy is working flawlessly, it was a bug from my end.

I am using react router and I forgot to setup a default route before deploying that's why I was getting a blank page.

I have setup a default route and everything is working well as expected.

Thanks all for your input.