0
votes

I am developing in angular 1.x and using firebase hosting at the same time. Firebase hosting deployment is very fast when you have a small static website.

But in my case, my angular app requires a bunch of bower_components files, 40k files to be specific. I understand that firebase hosting only hosts static websites, and I have to include these files upon deployment.

Yes I already used CDN links for most of the dependencies that I need, but those remaining non CDN dependencies are still too large.

Is there a way to deploy in firebase hosting in a much faster way, like git url or something?

Note

I already tried travis X firebase hosting approach but the problem is, travis only supports github and my project is in a private repository on bitbucket.

1

1 Answers

4
votes

Firebase Hosting requires that all files be uploaded on each deploy. We're investigating ways to make this faster, but don't have anything specific to announce along those lines just yet.

You may be able to cut down on deploy size by excluding files you know you don't need to deploy, for instance in firebase.json:

{
  "hosting": {
    "ignore": [
      "bower_components/*/test/**"
    ]
  }
}

This will prevent any test directories in your Bower components folder from being deployed. Most Bower packages include tons of files that aren't actually necessary for using the library.