{"library":"rollbar-sourcemap-webpack-plugin","title":"Rollbar Sourcemap Webpack Plugin","description":"This Webpack plugin automates the upload of generated sourcemaps to Rollbar after a production build. It addresses the challenge of making minified JavaScript stacktraces useful in Rollbar by ensuring the corresponding sourcemaps are always available. The current stable version is 3.3.0, with ongoing development and maintenance indicated by recent badges and version bumps. Its primary differentiator is deep integration with the Webpack build process, abstracting away the manual `curl` requests or shell scripts typically used for sourcemap uploads, thus reducing setup complexity and potential for error. It requires Webpack 4 or higher since version 3.0.0, streamlining the deployment of sourcemaps for error monitoring.","language":"javascript","status":"active","last_verified":"Wed Apr 22","install":{"commands":["npm install rollbar-sourcemap-webpack-plugin"],"cli":null},"imports":["import RollbarSourceMapPlugin from 'rollbar-sourcemap-webpack-plugin';","const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');\nconst path = require('path');\n\nconst PUBLIC_PATH = 'https://my.cdn.net/assets';\n\nmodule.exports = {\n  mode: 'production',\n  devtool: 'hidden-source-map',\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    publicPath: PUBLIC_PATH,\n    filename: 'index-[contenthash].js'\n  },\n  plugins: [\n    new RollbarSourceMapPlugin({\n      accessToken: process.env.ROLLBAR_ACCESS_TOKEN ?? 'aaaabbbbccccddddeeeeffff00001111', // Use environment variable in production\n      version: process.env.GIT_SHA ?? 'default-version-123',\n      publicPath: PUBLIC_PATH,\n      includeChunks: ['main'] // Specify chunk name if desired\n    })\n  ]\n};","lang":"javascript","description":"This quickstart demonstrates how to configure the plugin in a webpack.config.js to upload sourcemaps for a production build.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}