question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary firebase import

See original GitHub issue

https://github.com/vueuse/vueuse/blob/5e15d7a9622d7caa516bbff8ad7c066f157a617b/packages/firebase/useAuth/index.ts#L2

This import is unnecessary in most of cases

import firebase from 'firebase/app'

but makes difference to vendor bundle in all cases.

This is only needed for lines 18-20 https://github.com/vueuse/vueuse/blob/5e15d7a9622d7caa516bbff8ad7c066f157a617b/packages/firebase/useAuth/index.ts#L19

Let’s either leave that out or use dynamic import. Which one would be preferable?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
antfucommented, Jun 1, 2021

Ah, I see, @wheatjs maybe we could ask user to import the auth instance explicitly instead? Nice timing for the breaking change btw

0reactions
antfucommented, Jun 1, 2021

I don’t think dynamic imports worthwhile for this case (save a few keystrokes to import implicitly) as dynamic import will introduce much more problems to handle.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best practices for Cloud Firestore - Firebase
... Manage Cloud Firestore with the Firebase console · Export and import data · Manage data retention with time-to-live policies · Process data...
Read more >
How to exclude unnecessary Firebase files with Webpack ...
If it matters, we bundle with Webpack, never import the entire module, never import the compat modules, yet they're all still bundled.
Read more >
firebase/auth output is too big · Issue #1398 - GitHub
I'm using only firebase/app (required, and small enough) and firebase/auth (enormous): All I want is to use firebase to let my users login ......
Read more >
How to handle Firestore 'Reference' types in Algolia ...
Currently they store sensitive and unnecessary information when imported ... (a private SSH key for the firebase admin service account), ...
Read more >
How to improve Google PageSpeed Insights score for a Next ...
Keep JS bundles small · Example of webpack-bundle-analyzer report · Example of importing a particular Lodash function · config/firebase.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found