@sentry/vite-plugin

Official Vite plugin that uploads source maps and manages releases directly to Sentry at build time.

SDK
npm
v11.9.0
177 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
75 /100 Good
Development Activity 68
Maintenance 72
Community 84
Maturity 56
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
65 /100 Good
Architecture 68
Code Quality 68
Innovation 55
Learning Curve 70

@sentry/vite-plugin is Sentry’s officially maintained Vite integration for source map upload and release management. Dropped into a Vite (or Vue/React/etc. via Vite) build pipeline, it uploads generated source maps to Sentry after each build, creates and finalizes a release, and associates the deploy with that release so stack traces captured in production resolve back to original source rather than minified bundles.

The package is one of four thin bundler-specific adapters (alongside esbuild, Rollup, and Webpack plugins) inside the sentry-javascript-bundler-plugins monorepo. Its own source is a single re-export line — the actual upload, release, and CI-detection logic lives in a shared @sentry/bundler-plugins core package that is in the process of moving into Sentry’s main sentry-javascript monorepo ahead of a planned v11 consolidation, so behavior stays identical across every supported bundler.

What You Get

  • Automatic source map upload to Sentry after a Vite production build, with cleanup of the generated maps so they aren’t shipped to end users
  • Release creation and finalization in Sentry, tied to the current deploy
  • Automatic release-name discovery from CI environment variables (Vercel, AWS, Heroku, CircleCI) or the current git SHA, with no manual configuration required
  • Multi-project support — upload the same build’s source maps to several Sentry projects from one plugin config
  • Optional Babel-based React component-name annotation for clearer breadcrumbs and Session Replay recordings
  • A .env.sentry-build-plugin file convention so auth tokens and org/project settings can live outside vite.config.ts

Common Use Cases

  • Wiring up production error tracking for a Vite-built SPA so Sentry shows real file/line numbers instead of minified output
  • Tagging every production deploy with a Sentry release so errors can be bisected to the commit or deployment that introduced them
  • Uploading source maps for a multi-team app to several Sentry projects (e.g. per-team or per-tenant) from a single build
  • Improving React error triage by annotating breadcrumbs and replays with actual component names instead of generic anonymous function frames

Under The Hood

Architecture

Sentry’s Vite plugin is one of several thin per-bundler adapter packages (esbuild-plugin, rollup-plugin, webpack-plugin, vite-plugin) inside an Nx-orchestrated monorepo; each adapter’s src/index.ts does nothing but re-export the actual plugin factory from the external @sentry/bundler-plugins package (itself recently merged from the former @sentry/bundler-plugin-core and @sentry/babel-plugin-component-annotate), which now lives in Sentry’s main sentry-javascript monorepo ahead of a planned v11 consolidation. The Vite-specific surface area is limited to packaging: a Rolldown-based build config emits dual ESM/CJS bundles plus type declarations, and a prepack script regenerates the package README from a template by splicing in an auto-generated CLI-options table sourced from a shared internal dev-utils package. Cross-bundler behavior (source map upload, release creation, CI-based release-name discovery, component-name annotation) is implemented once in the shared core and consumed identically by all four adapters, so a change to upload logic reaches Vite, Webpack, Rollup, and esbuild simultaneously without touching this package’s own source.

Tech Stack

TypeScript targeting Node 18+, built with Rolldown (Rollup’s Rust-based successor), orchestrated across the workspace by Nx with build-output caching; linting and formatting run through the Oxc toolchain (oxlint/oxfmt) rather than ESLint/Prettier, and package management is Yarn workspaces spanning seven packages (dev-utils, esbuild-plugin, playground, rollup-plugin, vite-plugin, webpack-plugin, integration-tests-next). The plugin’s only runtime dependency is the shared @sentry/bundler-plugins package, which itself wraps Sentry’s CLI/API for source map and release operations.

Code Quality

The vite-plugin package itself ships no unit tests of its own — its test directory holds only a TypeScript config, reflecting the ongoing migration of core logic and its test suite out to the sentry-javascript monorepo. Vite-specific integration coverage instead comes from a sibling integration-tests-next package, which runs fixture-based builds (multi-page-app scenarios, source map assertions) against several separately installed major versions of Vite to catch bundler API drift across releases. Type checking is enforced separately for source and test code, CI runs lint/build/test/CodeQL on every change, and a dedicated license-compliance workflow gates new dependencies.

API Design The public surface is a single plugin-factory call (sentryVitePlugin({...})) dropped into a Vite config’s plugins array, with its options table auto-generated into the README from a shared schema so all four bundler adapters stay documented consistently. The plugin follows the same shape as competing error-tracking bundler integrations — upload maps, create a release, tag a deploy — rather than introducing a new technique; its most distinguishing conveniences are configuration-free release-name discovery across major CI providers, first-class multi-project upload from one config block, and an opt-in component-name annotation pass that most competing SDKs don’t offer.

Used by 29 apps in this directory

TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

483

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
68
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
TypeScript
100%
Apache 2.0

ILLA Builder

Design Tools · Developer Tools · Low Code Platforms

12,333

Open-source low-code platform for building internal tools with drag-and-drop UI, reactive data bindings, and real-time collaboration.

View details
55
Repo Health
71
Technical
63
Dependency
Built with
TypeScript 100%
Updated 5 months ago
PHP
55%
AGPL 3.0

Leantime

Collaboration · Productivity · Project Management

11,890

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
62
Dependency
Built with
PHP 55%
CSS 18%
Blade 14%
Updated 1 weeks ago
TypeScript
97%
Other

Lightdash

Analytics · Data Engineering

6,196

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
64
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated 1 weeks ago
TypeScript
65%
Other

NocoDB

Databases · Low Code Platforms · No Code Platforms

65,340

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
91
Repo Health
77
Technical
63
Dependency
Built with
TypeScript 65%
Vue 30%
Updated 6 days ago
TypeScript
98%
Other

Novu

Developer Tools

40,195

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago
Ruby
63%
MIT

OnetimeSecret

Security

2,970

Generate self-destructing single-use links to share passwords and sensitive data without leaving traces in inboxes or chat logs.

View details
92
Repo Health
81
Technical
72
Dependency
Built with
Ruby 63%
TypeScript 24%
Updated 6 days ago
TypeScript
81%
MIT

OpenCode

AI Code Assistants

220,711

A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.

View details
89
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 81%
MDX 16%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers