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 Its Configuration

Tip

The latest next.js compiler uses swc by default. For babel plugin configuration, please check 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 - Check.