[!WARNING] These plugins are currently in beta and are subject to change.
A Nuxt plugin that provides bundle analysis support for Codecov.
The plugin does not support code coverage, see our docs to set up coverage today!
[!NOTE] This plugin only support Nuxt 3.x when building with Vite.
Using npm:
npm install @codecov/nuxt-plugin --save-dev
Using yarn:
yarn add @codecov/nuxt-plugin --dev
Using pnpm:
pnpm add @codecov/nuxt-plugin --save-dev
// nuxt.config.ts
import { defineNuxtConfig } from "nuxt/config";
export default defineNuxtConfig({
devtools: { enabled: true },
// Ensure that the builder is set to "vite"
builder: "vite",
// Ensure that the plugin is added to the modules array
modules: [
[
"@codecov/nuxt-plugin",
{
enableBundleAnalysis: true,
bundleName: "nuxt-bundle-analysis",
uploadToken: process.env.CODECOV_UPLOAD_TOKEN,
},
],
],
});