remorses / next-superjson

Automatically transform your Next.js Pages to use SuperJSON, without losing swc support
69 stars 2 forks source link

`getLayout` does not work with `getStaticProps` #4

Open sanny-io opened 2 years ago

sanny-io commented 2 years ago

When following this guide and specifying a getStaticProps function in my page that uses a layout, the page is rendered, but is not wrapped in the layout.

After removing the getStaticProps function or after removing withSuperjson from my Next.js configuration, the issue goes away, and both the page and layout are rendered.

I'm using Next.js 12.1.4 and next-superjson 0.0.2

Haberkamp commented 2 years ago

I can confirm the exact same issue

merthanmerter commented 2 years ago

can confirm. It also causes a full reload.

merthanmerter commented 2 years ago

https://github.com/blitz-js/next-superjson-plugin/issues/18