@sentry/vite-plugin

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

SDK
npm
v5.4.0
177 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
70 /100 Good
Development Activity 52
Maintenance 68
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
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 6 days ago
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

33,179

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
85
Repo Health
76
Technical
66
Dependency
Built with
TypeScript 95%
Updated 3 weeks ago
TypeScript
45%
AGPL 3.0

BrowserOS

AI Assistants · Browser

13,763

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 23%
Python 18%
Updated 5 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,650

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
67
Repo Health
76
Technical
62
Dependency
Built with
JavaScript 90%
Updated 3 weeks ago
TypeScript
94%
AGPL 3.0

Element Web

Collaboration · Team Chat

13,518

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
65
Dependency
Built with
TypeScript 94%
Updated 6 days ago
Java
34%
Apache 2.0

Enso

Analytics · Data Engineering · Low Code Platforms

7,441

A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.

View details
59
Repo Health
90
Technical
61
Dependency
Built with
Java 34%
TypeScript 27%
Scala 26%
Updated 1 months ago
Python
63%
BSD 3

Flagsmith

Ab Testing Experimentation · Developer Tools · Devops

6,577

Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.

View details
90
Repo Health
82
Technical
63
Dependency
Built with
Python 63%
TypeScript 31%
Updated 1 weeks ago
TypeScript
51%
MIT

Ghost

Blogging · CMS

55,450

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
67
Dependency
Built with
TypeScript 51%
JavaScript 44%
Updated 5 days ago
Go
86%
MIT

Hatchet

AI Development · Automation · Developer Tools

8,014

A Postgres-backed orchestration engine for background tasks, AI agents, and durable workflows that replaces Redis queues and multi-datastore durable execution platforms with a single self-hostable service.

View details
88
Repo Health
83
Technical
67
Dependency
Built with
Go 86%
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