Next.js
Install and configure Next.js.
Create Project
First, use the following command to create a new React project with next.js
.
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.