Skip to Content

Next.js

Install and configure Next.js.

Create Project

First, create a new React project next.js using the following command.

npx create-next-app@latest

Add Canyon and Configuration

Tip

The latest Next.js compiler uses SWC by default. For Babel plugin configuration, see here .

npm install babel-plugin-istanbul babel-plugin-canyon -D

Configure Babel Plugin

babel.config.js
module.exports = { presets: ["next/babel"], plugins: ["istanbul", "canyon"], };

That’s It

Continue to First Coverage Data - Verification.