#How to check if I'm in SSR or SSG mode?

6 messages · Page 1 of 1 (latest)

tranquil fable
#

Some of my pages are in SSR mode, some are in SSG mode. I have a component that should behave differently, if the result will be immediately displayed to the user, and when it will be stored and displayed to the user much later. How can I check for that?

I'm looking for something like this:

if(import.meta.env.SSG) // is there a check similar to this?
{
    // code
}
west prairie
tranquil fable
pale pagoda
west prairie