Firebase deploy does not copy or link any of the .js scripts in the bower_components directory of my Angular app
So, I followed the getting started guide for deploying Firebase app with firebase-tools
and I was able to successfully deploy part of my app.I got index.html
all my .js scripts in directories too project_name/app/scripts/**
. I can test this in dev tools. I can't see the .js script file loaded, located in the directory bower_components/
that is basically the core of my application (AngularJS, jQuery, Bootstrap, Firebase, etc.).
Why is this happening?
Screenshot from devtools

firebase.json
{
"firebase": "angfirenews",
"public": "app",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
Create a production version of your application that does not reference the / bower_components directory, which is outside the / app directory.
For all reasons see here , this is the best explanation I can think of.
So, if you are using Yeoman, run grunt build
to create a separate version of the finished version of your application in "/ dist", which does not require downloading the bower component directories.
Then use that / dist ( firebase init
) directory and upload it to your firebase hosting.
If you are not using Yeoman or some other generator, you can re-create your index.html and link to the local directories of these files manually. Just an option, not as simple though or complete (yeoman does other things like minify and ouglify).