Skip to content

This is a Vite plugin for uploading Vite-generated Sourcemaps to Rolbar.

Notifications You must be signed in to change notification settings

madogiwa0124/vite-plugin-rollbar-sourcemap

Repository files navigation

Vite Plugin Rollbar Sourcemap

This is a Vite plugin for uploading Vite-generated Sourcemaps to Rolbar.

This plugin is inspired by the work of clinggroup on the original vite-plugin-rollbar. I appreciate their contributions to the Vite ecosystem.

Motivation

  • Implementation with TypeScript.
  • Ensuring code quality through test codes.
  • Supports the latest Vite.

Installation

npm install -D vite-plugin-rollbar-sourcemap

Usage

// vite.config.ts
import viteRollbar from "vite-plugin-rollbar-sourcemaop";

const rollbarConfig = {
  accessToken: "<ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN>",
  version: "<SOURCE_VERSION>",
  baseUrl: "yourwebsite.example.com",
  ignoreUploadErrors: true, // Suppresses throw exception.
  silent: false, // Suppresses log output.
};

export default defineConfig({
  plugins: [viteRollbar(rollbarConfig)],
  build: {
    sourcemap: true, // or "hidden"
  },
});

About

This is a Vite plugin for uploading Vite-generated Sourcemaps to Rolbar.

Resources

Stars

Watchers

Forks