Is it possible to know whether a page is using SSR or SSG in _app.getInitialProps? #12216
Unanswered
Vadorequest
asked this question in
Help
Replies: 1 comment 1 reply
-
I solved it by setting a boolean flag on the page itself (like you would define getInitialProps) MyPage.hasStaticProps = true |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In
_app.getInitialProps
, it'd be useful to know wether the page is using SSR or SSG, in order to perform some automated processing.One example would be to bypass most of the work related to SSR pages, when building SSG pages. See #10909 (reply in thread)
I'm thinking the
props
provided togetInitialProps
could contain such information.Beta Was this translation helpful? Give feedback.
All reactions