Vite
Viteのインストールと設定。
プロジェクトの作成
まず、以下のコマンドを使用して新しいReactプロジェクトvite
を作成します。
💡
Tip
現在はviteのreactテンプレートのみサポートしています
npm create vite@latest
Canyonの追加と設定
npm install babel-plugin-istanbul babel-plugin-canyon -D
babelプラグインの設定
vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react({
babel:{
plugins:["istanbul","canyon"]
}
})],
})
以上です
最初のカバレッジデータ - 確認に進んでください。