{"id":13761851,"url":"https://github.com/remorses/next-superjson","last_synced_at":"2025-05-08T04:26:16.801Z","repository":{"id":46138934,"uuid":"421761532","full_name":"remorses/next-superjson","owner":"remorses","description":"Automatically transform your Next.js Pages to use SuperJSON, without losing swc support","archived":false,"fork":false,"pushed_at":"2024-03-20T10:09:19.000Z","size":241,"stargazers_count":70,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T02:10:44.330Z","etag":null,"topics":["nextjs","superjson"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remorses.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-27T09:48:33.000Z","updated_at":"2024-06-18T19:56:26.523Z","dependencies_parsed_at":"2024-06-18T19:56:19.000Z","dependency_job_id":"bf0388e3-092d-49a4-bbd6-f2c099fbcaed","html_url":"https://github.com/remorses/next-superjson","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"1f7b8060b7f56bcd005b16305e0f204834a53e0e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fnext-superjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fnext-superjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fnext-superjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fnext-superjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remorses","download_url":"https://codeload.github.com/remorses/next-superjson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231474812,"owners_count":18382160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","superjson"],"created_at":"2024-08-03T14:00:30.397Z","updated_at":"2025-05-08T04:26:16.790Z","avatar_url":"https://github.com/remorses.png","language":"TypeScript","funding_links":[],"categories":["Nextjs Plugins"],"sub_categories":[],"readme":"## Getting started\n\nInstall the library with your package manager of choice, e.g.:\n\n```\nnpm install next-superjson next-superjson-plugin superjson\n```\n\nSince this is a companion to [SuperJSON](https://github.com/blitz-js/superjson),\nmake sure it's also installed, also with `next-superjson-plugin` which is a runtime dependency.\n\nAdd the plugin to your `next.config.js`.\nIf you don't have one, create it.\n\n```js\nconst { withSuperjson } = require('next-superjson')\n\nmodule.exports = withSuperjson()({})\n```\n\n\u003e [!NOTE]\n\u003e Notice that you have to call the plugin function 2 times, this is to support options in the future\n\nThat's it! Now you're free to use all values and type supported by SuperJSON in your Next.js Components.\n\n# How it works\n\nNew 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).\n\nThis plugin will inject the superjson plugin only on files under the `pages` directory so you can keep using swc for all the other files.\n\nVersion 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.](https://github.com/blitz-js/babel-plugin-superjson-next/issues/145#issuecomment-2452145624)\n\n## Turbopack support\n\nSince version 1 this plugin also supports the `--turbo` flag.\n\n## What is the different between this plugin and `next-superjson-plugin` SWC plugin?\n\n`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.\n\nThis plugin instead freezes the version of `@swc/core` to one that is guaranteed to work.\n\n## Sponsors\n\n[**Notaku**](https://notaku.website)\n\n[![Notaku](https://notaku.so/github_banner.jpg)](https://notaku.so)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremorses%2Fnext-superjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremorses%2Fnext-superjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremorses%2Fnext-superjson/lists"}