Skip to content

Build error using Astro JS and @astrojs/cloudflare #350

@felixlublasser

Description

@felixlublasser

I'm trying to use isomorphic-dompurify in our Astro JS project. When building the Astro JS pages (using Vite), I'm getting the following:

window is not defined
  Hint:
    Browser APIs are not available on the server.
    
    If the code is in a framework component, try to access these objects after rendering using lifecycle methods or use a `client:only` directive to make the component exclusively run on the client.
    
    See https://docs.astro.build/en/guides/troubleshooting/#document-or-window-is-not-defined for more information.

Any chance you could take a look at this?

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