I have following lines at the bottom of my <body>:
<script type="module" src="../js/firebase.js"></script>
<script src="../js/common.js"></script>
Here is firebase.js:
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.10.0/firebase-app.js";
import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/9.10.0/firebase-auth.js";
import { getDatabase } from "https://www.gstatic.com/firebasejs/9.10.0/firebase-database.js";
const firebaseConfig = {
...
};
export const app = initializeApp(firebaseConfig);
And here is an import inside common.js:
import {app} from './firebase.js';
...
This import raises SyntaxError: Unexpected identifier '{'. import call expects exactly one argument