
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
vite-plugin-bugsnag
Advanced tools
Report builds and upload source maps to bugsnag
There is no official plugin from Bugsnag for Vite.js.
This plugin provides the same functionality as webpack-bugsnag-plugins in Vite.js.
The API is similar to simplify the migration when moving away from Webpack.
Install the package as a development dependency:
npm i -D vite-plugin-bugsnag # yarn add -D vite-plugin-bugsnag
Two plugins are provided, one to report build information, and another one to upload sourcemaps.
Both plugins accept apiKey
, appVersion
, and endpoint
, so you can share a config object.
For example:
import { defineConfig } from 'vite'
import { BugsnagBuildReporterPlugin, BugsnagSourceMapUploaderPlugin } from 'vite-plugin-bugsnag'
const isDistEnv = process.env.RAILS_ENV === 'production'
const bugsnagOptions = {
apiKey: process.env.BUGSNAG_API_KEY,
appVersion: process.env.APP_VERSION,
}
export default defineConfig({
plugins: [
isDistEnv && BugsnagBuildReporterPlugin({ ...bugsnagOptions, releaseStage: process.env.RAILS_ENV }),
isDistEnv && BugsnagSourceMapUploaderPlugin({ ...bugsnagOptions, overwrite: true }),
],
})
BugsnagBuildReporterPlugin (options)
Use this plugin to report your application's build to Bugsnag.
import { defineConfig } from 'vite'
import { BugsnagBuildReporterPlugin } from 'vite-plugin-bugsnag'
export default defineConfig({
plugins: [
BugsnagBuildReporterPlugin({
apiKey: 'YOUR_API_KEY',
appVersion: '1.2.3',
}),
],
})
.git
, .hg
and package.json
writeBundle
to upload the information once the build is finishedBugsnagSourceMapUploaderPlugin (options)
Use this plugin to upload your application's sourcemaps to Bugsnag.
import { defineConfig } from 'vite'
import { BugsnagSourceMapUploaderPlugin } from 'vite-plugin-bugsnag'
export default defineConfig({
build: {
sourcemap: true,
},
plugins: [
BugsnagSourceMapUploaderPlugin({
apiKey: 'YOUR_API_KEY',
appVersion: '1.2.3',
base: 'https://your-app.xyz/assets/',
}),
],
})
build.sourcemap
in order for Vite to generate sourcemapsThis library is available as open source under the terms of the MIT License.
FAQs
Report builds and upload source maps to Bugsnag
The npm package vite-plugin-bugsnag receives a total of 10,631 weekly downloads. As such, vite-plugin-bugsnag popularity was classified as popular.
We found that vite-plugin-bugsnag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.