Hi,
I’m trying to use Firebase with Cocos Creator v3 & tried with Cocos Creator v2 too. I installed the Firebase through npm
But unfortunately it throws errors
in Cocos Creator v2 using it like
const { initializeApp } = require('firebase/app');
ERROR MSG
Cannot use import statement outside a module
in Cocos Creator v3 using it like
import { initializeApp } from "firebase/app"
;
const app = initializeApp(firebaseConfig); //on initialise it throws error if remove this line then no error
ERROR MSG
Unexpected export statement in CJS module.