Flare by Spatie
    • Error Tracking
    • Performance Monitoring
    • Logs
  • Pricing
  • Docs
  • Insights
  • Changelog
  • Back to Flare ⌘↵ Shortcut: Command or Control Enter
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Logs
  • Pricing
  • Docs
  • Insights
  • Changelog
    • Back to Flare ⌘↵ Shortcut: Command or Control Enter
    • Try Flare for free
    • Sign in
Flare Flare PHP PHP JavaScript JavaScript Protocol Protocol
React
  • JavaScript
  • React
  • Vue
  • Svelte
  • Inertia
  • React Native
  • Electron
  • Getting Started
  • Quick start
  • Errors
  • Error boundary
  • Error handler
  • Reporting errors
  • Client hooks
  • Sourcemaps
  • Tracing
  • Introduction
  • Profiling
  • Introduction
  • Data Collection
  • Adding custom context
  • Adding glows
  • Identifying users
  • Reference
  • API
  • JavaScript, all frameworks
  • How tracing works
  • What gets traced
  • Web vitals
  • Manual spans
  • Sampling
  • Component profiling
  • Configuration

Sourcemaps

View as Markdown

When you bundle your frontend code for production (using Webpack, Vite, …), it will get minified and transformed and ultimately won't look like the original code anymore. This means the stack traces and code snippets attached to error reports won't be readable.

Flare can resolve the original source code using sourcemaps. If you're using Vite or Webpack, the @flareapp/vite (or Webpack) plugin handles this automatically: it uploads sourcemaps during your build and connects them to your project.

The React integration uses the same sourcemap plugins as the core JavaScript client. Head over to the JavaScript sourcemaps documentation for full setup instructions for Vite, Webpack, Next.js, Laravel Mix, and manual uploads.

If you're using the sourcemap plugin, you don't need to specify a project public key in your flare.light() call. The plugin will automatically hook it up to your project.

Client hooks Introduction

Catch errors and fix slowdowns with Flare, the full-stack application monitoring platform for Laravel, PHP & JavaScript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Insights
  • Newsletter
  • Changelog
  • Documentation
  • Affiliate program
  • uptime status badge Service status
  • Terms of use
  • DPA
  • Privacy & cookie Policy
Made in by Spatie logo
Flare