Socket
Socket
Sign inDemoInstall

@backtrace-labs/rollup-plugin

Package Overview
Dependencies
9
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @backtrace-labs/rollup-plugin

Backtrace Rollup plugin


Version published
Weekly downloads
3
Maintainers
7
Created
Weekly downloads
 

Readme

Source

@backtrace-labs/rollup-plugin

If you're using rollup as your project bundler, you can use @backtrace-labs/rollup-plugin to automate working with sourcemaps.

(Source Map feature documentation)

Enable Source Maps for Your Application

Set sourcemap in output to true in your rollup.config.js:

module.exports = {
  build: {
    sourcemap: true
  }
}

If you're using code transpiler plugins (such as Typescript), ensure to enable source-mapping there as well.

Set up @backtrace-labs/rollup-plugin

Construct an upload URL

A specific URL is required to upload source maps. Follow these instructions to create an upload URL for the sourcemap endpoint with a symbol-post token.

Install @backtrace-labs/rollup-plugin as a developer dependency:

> npm install --save-dev @backtrace-labs/rollup-plugin

Add it to your plugins array in rollup.config.js:

import { BacktracePlugin } from '@backtrace-labs/rollup-plugin';
// or
const { BacktracePlugin } = require('@backtrace-labs/rollup-plugin');

module.exports = {
  // other configuration
  plugins: [new BacktracePlugin({
    // enable upload only on production builds
    uploadUrl: process.env.NODE_ENV === "production" ? "<your upload URL>" : undefined
  })]
}

Keywords

FAQs

Last updated on 15 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc