Socket
Socket
Sign inDemoInstall

babel-plugin-superjson-next

Package Overview
Dependencies
3
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-superjson-next

Install the library with your package manager of choice, e.g.:


Version published
Maintainers
3
Install size
2.53 MB
Created

Readme

Source

superjson X next.js

Automatically transform your Next.js Pages to use SuperJSON. Supports getStaticProps & getServerSideProps.

All Contributors npm CI

Getting started

Install the library with your package manager of choice, e.g.:

npm install babel-plugin-superjson-next

Since this is a companion to SuperJSON, make sure it's also installed:

npm install superjson

for npm 7 or later, you can skip this since from npm v7 automatically installs peer dependencies

Add the plugin to your .babelrc. If you don't have one, create it.

{
  presets: ['next/babel'],
  plugins: [
    ...
    'superjson-next' // ๐Ÿ‘ˆ
  ]
}

That's it! Now you're free to use all values and type supported by SuperJSON in your Next.js Components.

Options

You can use the exclude option to exclude specific properties from serialisation.

{
  presets: ['next/babel'],
  plugins: [
    ...
    ['superjson-next', { exclude: ["someProp"] }]
  ]
}

Contributing

  1. Clone the repo
  2. yarn
  3. yarn build

Test Example App

  1. cd example
  2. yarn (make sure you first run yarn build in the repo root)
  3. yarn test

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Simon Knott

๐Ÿ’ป ๐Ÿ“น ๐Ÿค” ๐Ÿšง

Brandon Bayer

๐Ÿค” ๐Ÿ“ข

Nicolas Torres

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Benjamin Johnson

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Joris

๐Ÿ’ป

Alex Rohleder

๐Ÿ›

Alex Johansson

๐Ÿ’ฌ

Cyrus

๐Ÿ›

Gabe O'Leary

๐Ÿ›

jlmodell

๐Ÿ›

Cheese

๐Ÿ›

JuanM04

๐Ÿ›

Pieter Venter

๐Ÿ›

Santeri Elo

๐Ÿ’ป

Diego Albitres

๐Ÿ’ป

Michaล‚ Miszczyszyn

๐Ÿ› ๐Ÿ”Œ

รtalo Andrade

๐Ÿ› ๐Ÿ’ป

Vincas Stonys

๐Ÿ›

Felipe Lima

๐Ÿ’ป ๐Ÿ›

Dante

๐Ÿ“–

Nils Haberkamp

๐Ÿ’ป ๐Ÿ”Œ ๐Ÿ›

This project follows the all-contributors specification. Contributions of any kind welcome!

FAQs

Last updated on 22 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc