Not able to import firebase

Viewed 22

I downloaded firebase from (npm install firebase)

I used the script from Firebase to initialize the Firebase app:

import { initializeApp } from 'firebase/app';

const firebaseConfig = {
  //...
};

const app = initializeApp(firebaseConfig);

on my head tag but I am getting an error in my console

Uncaught SyntaxError: Cannot use import statement outside a module

can please anyone tell the fix to this error

0 Answers
Related