I am developing an extension with firebase as backend.
My extension is absolutely working with the below imports.
import { initializeApp } from ‘https://www.gstatic.com/firebasejs/10.7.0/firebase-app.js’
import { getAuth, onAuthStateChanged,signOut,signInWithEmailAndPassword } from ‘https://www.gstatic.com/firebasejs/10.7.0/firebase-auth.js’;
import {getFirestore,collection, getDocs,getDoc,setDoc,addDoc,doc,query,where} from ‘https://www.gstatic.com/firebasejs/10.7.0/firebase-firestore.js’
But extension is rejected saying that “Including remotely hosted code in a Manifest V3 item.” as i am calling https://*
Below is the folder structure maintained.
enter image description here
Hence i tried to change the imports to below but i am getting error “Service worker registration failed. Status code: 3”
import { initializeApp } from ‘../node_modules/firebase/app’;
import { getAuth, onAuthStateChanged,signOut,signInWithEmailAndPassword } from ‘../node_modules//firebase/auth’;
import {getFirestore,collection, getDocs,getDoc,setDoc,addDoc,doc,query,where} from ‘/firebase/firestore’
could somoeone assist me here to proceed further.
Swapna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.