Search code examples
angularfirebasefirebase-hosting

Angular 2 on Firebase Hosting


I have finished an app in Angular 2 which doesn't need to use the Firebase database and other functions. It just needs to render, show it's UI and do it fast.

To get straight to the point, I didn't use AngularFire2 (tried it, haven't succeeded just yet), but I simply used the firebase init command and had to adjust my firebase.json to look like this:

{
  "firebase": "my-simple-n2-app",
  "public": "./",
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ]
}

As you can see I simply loaded all my npm modules in, which is probably causing the long loading time. Are there other ways to quickly host some Angular 2 UI on Firebase?


Solution

  • Try making a bundle of your files using jspm or webpack, so you don't need to upload all your npm_modules.