Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Dynamic import required with SSR, not necessary #2

Description

@MatthewCaseres

When monacoEditor.tsx imports ConsoleLog it causes error "document not defined". In the version of this package that is not on npm (the npm component grew out of a component from a NextJS project) this is solved with using a dynamic import via "next/dynamic".

I tried some hacks to make this work a while ago, not sure what the solution is. I had some wacky if(window){const ConsoleLog = require("./ConsoleLog")} or something like that, but TSDX didn't like it and maybe it just wasn't a good way of doing things.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions