Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

A Vite plugin to upload sourcemaps to Rollbar

License

Notifications You must be signed in to change notification settings

prolific-oss/vite-plugin-rollbar

 
 

Repository files navigation

Plugin to integrate Vite ⚡️ with Rollbar

Version License: MIT GitHub issues

This is a Vite plugin that simplifies uploading the sourcemaps, generated from a Vite build, to Rollbar.

Installation

Install the plugin with npm:

npm install vite-plugin-rollbar --save-dev

Basic Usage

An example vite.config.js:

// vite.config.ts
// other declarations
import viteRollbar from 'vite-plugin-rollbar'

/*
  Configure Rollbar plugin
*/
const rollbarConfig = {
  accessToken: '<SECRET_TOKEN_HERE>',
  version: '1.0',
  baseUrl: 'yourwebsite.com',
  silent: true,
}

export default defineConfig({
  // other options
  plugins: [ viteRollbar(rollbarConfig) ],
  build: {
    // Required: tells Vite to create source maps
    sourcemap: true,
  }
})

About

A Vite plugin to upload sourcemaps to Rollbar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%