blitz-js / babel-plugin-superjson-next

Automatically transform your Next.js Pages to use SuperJSON
MIT License
124 stars 15 forks source link

Fix client props not being deserialized #34

Closed flybayer closed 3 years ago

flybayer commented 3 years ago

Closes: https://github.com/blitz-js/babel-plugin-superjson-next/issues/28

So the core issue here is that in the client build Next.js removes the prop getter exports, so the detection logic for this in the plugin failed.

I tried many different things including react experimental but was unable to reproduce in the example app here in the repo 🤷

This fix changes to add the superjson HOC on every page except for _app, _document, and _error.