Remix (Vite) Quick Start
Quick start guide for Codecov Bundle Analysis and Remix.
To install the @codecov/remix-vite-plugin
to your project, use the following commands.
npm install @codecov/remix-vite-plugin --save-dev
yarn add @codecov/remix-vite-plugin --dev
pnpm add @codecov/remix-vite-plugin --save-dev
Add the plugin to the end of your plugins array found inside your vite.config.ts
file, and pass your configuration.
You can find a Codecov upload token on the Configuration page for your repository, under General, or your organization settings page in the Codecov UI. For more information, see the documentation.
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { codecovRemixVitePlugin } from "@codecov/remix-vite-plugin";
export default defineConfig({
plugins: [
remix(),
tsconfigPaths()
// Put the Codecov Remix Vite plugin after all other plugins
codecovRemixVitePlugin({
enableBundleAnalysis: true,
bundleName: "example-remix-bundle",
uploadToken: process.env.CODECOV_TOKEN,
}),
],
});
The plugin requires at least one commit to be made to properly upload bundle analysis information to Codecov.
git add -A && git commit -m "Add Codecov bundler plugin" && git push
When building your application the plugin will automatically upload the stats information to Codecov.
npm run build
yarn run build
pnpm run build
By default, Codecov's bundler plugins collects telemetry data on issues and performance metrics internally, enabling us to analyze the plugins for performance and monitor potential issues.
You can opt-out of sending this telemetry data by setting the options.telemetry
option in the plugin config to false
. For example if you're using the Remix (Vite) plugin, the Codecov plugin configuration might look like the following:
codecovRemixVitePlugin({
enableBundleAnalysis: true,
bundleName: "example-remix-bundle",
uploadToken: process.env.CODECOV_TOKEN,
telemetry: false // <- Setting to `false`
// ... other options
})
Updated 5 months ago