me arroja este error: The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script , cuando se intenta crear una aplicación en reacción para producción. Uso dos archivos: App.js y firebase.js. Estas son las importaciones de App.js y el archivo firebase.js (que contiene la configuración de acceso de firebase):
Aplicación.js:
import React from 'react'; import {auth, db} from './firebase' import { getFirestore, collection, getDocs, onSnapshot, addDoc, deleteDoc, doc, getDoc, updateDoc }from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-firestore.js'; import { getAuth, createUserWithEmailAndPassword, onAuthStateChanged,signInWithEmailAndPassword,signOut} from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-auth.js';base de fuego.js:
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.8.1/firebase-app.js"; import { getFirestore, collection, getDocs, onSnapshot, addDoc, deleteDoc, doc, getDoc, updateDoc, } from "https://www.gstatic.com/firebasejs/9.8.1/firebase-firestore.js"; import { getAuth, createUserWithEmailAndPassword, onAuthStateChanged,signInWithEmailAndPassword,signOut} from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-auth.js'; const firebaseConfig = { //my data }; // Initialize Firebase const app = initializeApp(firebaseConfig); const db = getFirestore(app); const auth = getAuth(app); export {auth,db}