Skip to content

Does this package support SSR? #48

Open

Description

@CaseyPlummer

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.

Activity

  1. OfficialDelta commented on Feb 6, 2022

    @OfficialDelta

    You can mitigate this with:

    import * as rxfire from 'rxfire/firestore';
    const { collectionData } = rxfire;
  2. self-assigned this
    on Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions