Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I "link in" the firebase.js code (i.e. how to get started) #1

Closed
FredrikNoren opened this issue Apr 5, 2023 · 1 comment
Closed

Comments

@FredrikNoren
Copy link
Collaborator

Hi,

Looks like great work on this! I'm trying to use it in a project, but I'm new to using wasm on the web an I'm not entirely sure how I would actually do that?

I found another crate which just imports the firebase.js with script tags: https://github.com/wa1aric/firebase-js-rs

I tried that, but I'm getting this error in the console: Failed to resolve module specifier "firebase/firestore". Relative references must start with either "/", "./", or "../".

Any pointers on how to do this?

@FredrikNoren
Copy link
Collaborator Author

Ah, I figured it out; here's how to do it:

<script type="importmap">
    {
        "imports": {
            "firebase/app": "https://www.gstatic.com/firebasejs/9.19.1/firebase-app.js",
            "firebase/auth": "https://www.gstatic.com/firebasejs/9.19.1/firebase-auth.js",
            "firebase/firestore": "https://www.gstatic.com/firebasejs/9.19.1/firebase-firestore.js"
        }
    }
  </script>

jquesada2016 pushed a commit that referenced this issue Aug 2, 2023
chore: bump serde-wasm-bindgen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant