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

Does this package support SSR? #48

Open
CaseyPlummer opened this issue Dec 16, 2021 · 1 comment
Open

Does this package support SSR? #48

CaseyPlummer opened this issue Dec 16, 2021 · 1 comment
Assignees

Comments

@CaseyPlummer
Copy link

I'm trying to use SvelteKit with rxfire. When I build and preview for production, it gives me an error upon I opening the app.

This line:
import { collectionData } from 'rxfire/firestore';

Get this error:
Named export 'collectionData' not found. The requested module 'rxfire/firestore' is a CommonJS module, which may not support all module.exports as named exports.

Packages I'm using:

    "firebase": "^9.6.1",
    "rxfire": "^6.0.3",
    "rxjs": "^7.4.0"

I can get firebase alone to work, but when I try to include fxfire, it errors.

This might also be an issue with Vite. Just want to know if rxfire was tested/supported for SSR. Thanks.

@OfficialDelta
Copy link

You can mitigate this with:

import * as rxfire from 'rxfire/firestore';
const { collectionData } = rxfire;

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

3 participants