Estoy trabajando en un proyecto web integrado con la autenticación de base de fuego. Así que he creado un index.js como:
:--index.js
import { } from "test.js"; function hello(){ alert("great!!"); }:--index.html
<!DOCTYPE html> <html> <head> <title>Title</title> <script type="module" src="index.js"></script> </head> <body> <button onclick="hello()" id="click">Click here</button> </body> </html>Arriba está mi código cada vez que trato de llamar a la función a través de mí, un error dice:
hola funcion no definida
¿Me pueden ayudar a llamar a una función cuando hay type=module?