giliamverheide / next-ts-swc-rainbowkit-issue

Showcases an issue with using swcMinify in a next, typescript and rainbowkit project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next.js + TS + SWC Minification + RainbowKit

This repository serves as an example of a minimal next + typescript + swc + @rainbow-me/rainbowkit project.

Setting swcMinify: true in next.config.js causes rainbowkit to break with the following error output: Uncaught SyntaxError: missing ) after argument list

Relevant code:

// next.config.js
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true // breaks the app
  // Setting swcMinify to false works fine
  // and renders a "Connect Wallet" button
  // on the index page as expected.
}

Installation

# Install dependencies
yarn

# Build and export as a static site
yarn build

# Serve the site locally
yarn serve

About

Showcases an issue with using swcMinify in a next, typescript and rainbowkit project.


Languages

Language:CSS 51.5%Language:TypeScript 44.9%Language:JavaScript 3.6%