'Firebase 9.6.6 JS from CDN errors out
I am trying to hook CDN based firebase libs for one of my project and as per the doc its doable https://firebase.google.com/docs/web/alt-setup
But when i put below html/js code
<html>
<body>
<script type="module">
import { initializeApp } from 'https://www.gstatic.com/firebasejs/9.6.6/firebase-app.js'
// Add Firebase products that you want to use
import { auth } from 'https://www.gstatic.com/firebasejs/9.6.6/firebase-auth.js'
const firebaseConfig = {
apiKey: "<>",
authDomain: "<>.firebaseapp.com",
projectId: "<>",
storageBucket: "<>.appspot.com",
messagingSenderId: "<>",
appId: "<>",
measurementId: "<>"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
</script>
</body>
</html>
Its error out with below log (seen on console)
Uncaught SyntaxError: import not found: auth
I do not want to fallback to older version of firebase, so is there any solution someone can suggest?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
