Skip to content

SSR support #7

@idevelop

Description

@idevelop

When including the library in a next.js app, I see the following errors:

  1. Server Error: ReferenceError: self is not defined
  2. Manually replacing self with globalThis in your build/index.js leads to: Server Error: ReferenceError: document is not defined

Both of these happen because neither self nor document globals exist in a server-side-rendered environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions