{"repo":"remorses/next-superjson","free":true,"listed":false,"github":"https://github.com/remorses/next-superjson","clone":"git clone https://github.com/remorses/next-superjson.git","description":"Automatically transform your Next.js Pages to use SuperJSON, without losing swc support","language":"TypeScript","stars":70,"topics":["superjson","nextjs"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"Getting started [!IMPORTANT] Version 2.x requires Next.js 16+ . If you're using Next.js 15, install version 1.x instead: Install the library with your package manager of choice, e.g.: Since this is a companion to SuperJSON, make sure it's also installed, also with next-superjson-plugin which is a runtime dependency. Add the plugin to your next.config.js . If you don't have one, create it. [!NOTE] Notice that you have to call the plugin function 2 times, this is to support options in the future That's it! Now you're free to use all values and type supported by SuperJSON in your Next.js Components. How it works New Nextjs 12 uses swc to compile user code by default, adding a custom .babelrc file will make Nextjs compile everything using Babel instead (much slower). This plugin will inject the superjson plugin only on files under the pages directory so you can keep using swc for all the other files. Version 1 of this plugin will use the SWC superjson plugin instead of the Babel plugin, this is because the previous Babel plugin no longer works, thanks to commonjs and ESM skill issues by one of the core developers. Turbopack support Since version 1 this plugin also supports the --turbo flag. What is the different between this plugin and next-superjson-plugin SWC plugin? next-superjson-plugin broke in version 15 of Next.js because SWC was updated to a version that no longer supported plugins built with a different version of swc core binary. This plugin instead freezes the version ","default_branch":null,"files":null,"tree":[],"storefront":"/r/remorses","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/remorses/next-superjson/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}