This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@backtrace-labs/webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@backtrace-labs/webpack-plugin

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

(Source Map feature documentation)

Enable Source Maps for Your Application

Set devtool to source-map in your webpack.config.js:

module.exports = {
  devtool: 'source-map',
  // other configuration
}

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

Set up @backtrace-labs/webpack-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/webpack-plugin as a developer dependency:

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

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

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

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

Package Sidebar

Install

npm i @backtrace-labs/webpack-plugin

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

10.5 kB

Total Files

9

Last publish

Collaborators

  • acronin
  • sebastian.alex
  • backtrace-engineering
  • amadden80
  • kdysput