🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@sentry/vite-plugin

Package Overview
Dependencies
Maintainers
10
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/vite-plugin

Official Sentry Vite plugin

3.4.0
latest
Source
npm
Version published
Weekly downloads
1.1M
4.3%
Maintainers
10
Weekly downloads
 
Created

What is @sentry/vite-plugin?

@sentry/vite-plugin is a Vite plugin that integrates Sentry's error tracking and performance monitoring into Vite projects. It helps in capturing and reporting errors, performance issues, and other telemetry data from your Vite-based applications.

What are @sentry/vite-plugin's main functionalities?

Error Tracking

This feature allows you to configure Sentry for error tracking in your Vite project. By providing your Sentry organization, project, and authentication token, you can automatically capture and report errors.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      url: 'https://sentry.io/',
    }),
  ],
});

Source Maps Upload

This feature allows you to upload source maps to Sentry, which helps in better error tracking by providing readable stack traces. You need to specify the directory containing the source maps.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      include: './dist',
      url: 'https://sentry.io/',
    }),
  ],
});

Performance Monitoring

This feature enables performance monitoring in your Vite project. By setting the `tracesSampleRate`, you can control the sampling rate for performance data collection.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      url: 'https://sentry.io/',
      tracesSampleRate: 1.0,
    }),
  ],
});

Other packages similar to @sentry/vite-plugin

Keywords

Sentry

FAQs

Package last updated on 05 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts