next-superjson-plugin icon indicating copy to clipboard operation
next-superjson-plugin copied to clipboard

Do not patch function if already patched, support reexporting page and getServerSideProps

Open remorses opened this issue 1 year ago • 1 comments

Currently if you reexport a page and gssp function you will get an error, because the props are serialized 2 times

This is an example page with the problem:

import Page from './page'
import { getServerSideProps } from './page'

export default Page
export { getServerSideProps }

remorses avatar Nov 14 '24 11:11 remorses

Hi, this plugin seems to no longer be maintained. Feel free to add your PR in this fork https://github.com/serg-and/superjson-next

serg-and avatar Mar 28 '25 13:03 serg-and