[how to add firebase](https://how to add firebase)

i want to add a login to a project in in the simplest way so im trying to use firebase. the page is simply using html,css,javascript. im trying to read over the documentation and it says i have to add the sdk and choose one of these opotions, which one do I choose, none seem to fit from my understanding, should I not be trying to use firebase

  • npm (for module bundlers and Node.js)
  • CDN (content delivery network)
  • Firebase Hosting URLs

If you are writing HTML, CSS and JS, I suppose you need to use the CDN.

1 Like

It depends how you’re doing this. If you’re building locally (sure, it might be HTML/CSS/JS, but if you’re using Webpack on a local machine, for example), you can do the npm route and include the module that way.

If, instead, you’re developing without some sort of bundler, or you’re developing in some sort of codepen or replit, then yes, by all means use the CDNs that google provides:

https://firebase.google.com/docs/web/setup#from-the-cdn

1 Like