vite-plugin-rollbar

0.0.14 • Public • Published

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',
  ignoreUploadErrors: true,
  silent: true,
}

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

Package Sidebar

Install

npm i vite-plugin-rollbar

Weekly Downloads

5,678

Version

0.0.14

License

MIT

Unpacked Size

28 kB

Total Files

12

Last publish

Collaborators

  • rang-ali