sp92
sp92

Reputation: 987

How would I deploy my React.js changes on custom domain?

I just finished making a website using React.js but realized that I needed to make one more small edit. Upon running firebase deploy, it keeps deploying the changes to the default hosting URL Firebase provides and not deploying changes to my custom domain (which's up and running right now).

I tried to go into the .firebaserc file and changing it up from:

{
  "projects": {
    "default": "mywebsite-1d988"
  }
}

to:

{
  "projects": {
    "custom": "myWebsite"
  }
}

How can I fix this in order to edit changes to my custom domain and not firebase default domain upon running firebase deploy?

Upvotes: 2

Views: 805

Answers (1)

Renaud Tarnec
Renaud Tarnec

Reputation: 83191

If I understand correctly, you should note that you cannot deploy a Firebase Project to your own hosting infrastructure with the CLI (i.e. by doing firebase deploy).

With firebase deploy you always deploy to your Firebase project, hosted in the Firebase/Google Cloud Platform infrastructure.

What you can do in terms of "custom domain" is to connect your custom domain to your Firebase Hosting site, as explained here: https://firebase.google.com/docs/hosting/custom-domain.

This will redirect any request to your domain (e.g. myWebsiteName.com) to your Firebase Hosting site (mywebsite-1d988.firebaseapp.com), in a transparent way for the users.

Upvotes: 3

Related Questions