I am using vanilla JS. I have tried using https://requirejs.org/docs/start.html however it didn't fix the issue. I have spent several hours troubleshooting, and it just leads to new errors.
const { default: firebase } = require("firebase");
var firebaseConfig = {
apiKey: "...",
authDomain: "bug-tracker-e6006.firebaseapp.com",
projectId: "...",
storageBucket: "bug-tracker-e6006.appspot.com",
messagingSenderId: "551171540691",
appId: "...",
measurementId: "G-CHWE3GTHH7"
};
// Initialize Firebase
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig)
}
firebase.analytics();
<!DOCTYPE html>
<html lang="en">
<head>
<h2>our example</h2>
<body>
</body>
</html>