Skip to content

[Feature]: Support for distinguishing between SSG and CSR environments #3140

@hotoo

Description

@hotoo

What problem does this feature solve?

My website has SSG enabled, but there's a custom component that I don't want to render during SSG build to static HTML. Instead, I want it to automatically calculate and determine whether to display based on environment information during CSR.

What does the proposed API look like?

Provide an environment variable or other solution to determine whether it's an SSG environment in MDX or React components?

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