2.22.6 • Published 7 months ago

@sentry/babel-plugin-component-annotate v2.22.6

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Sentry Babel Component Annotate Plugin

npm version npm dm npm dt

A Babel plugin that automatically annotates your output DOM with their respective frontend component names. This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring. Please note that your Sentry JavaScript SDK version must be at least 7.91.0 to take advantage of these features. Currently, this plugin only works with React, and will exclusively parse .jsx and .tsx files.

Note

This plugin comes included in Sentry's bundler plugins, alongside many other features to improve your Sentry workflow. It can be downloaded individually, but it is recommended that you install the bundler plugins for your respective bundler, and enable this feature through the config object.

Check out the supported bundler plugin packages for installation instructions:

Installation

Using npm:

npm install @sentry/babel-plugin-component-annotate --save-dev

Using yarn:

yarn add @sentry/babel-plugin-component-annotate --dev

Using pnpm:

pnpm add @sentry/babel-plugin-component-annotate --save-dev

Example

// babel.config.js

{
  // ... other config above ...

  plugins: [
    // Put this plugin before any other plugins you have that transform JSX code
    ['@sentry/babel-plugin-component-annotate']
  ],
}

Or alternatively, configure the plugin by directly importing it:

// babel.config.js

import componentNameAnnotatePlugin from '@sentry/babel-plugin-component-annotate';

{
  // ... other config above ...

  plugins: [
    // Put this plugin before any other plugins you have that transform JSX code
    [componentNameAnnotatePlugin]
  ],
}

More information

2.22.6

7 months ago

2.22.5

7 months ago

2.19.0

11 months ago

2.17.0

12 months ago

2.18.0

11 months ago

2.22.3

9 months ago

2.22.2

9 months ago

2.22.4

8 months ago

2.21.0

10 months ago

2.22.1

9 months ago

2.20.0

11 months ago

2.22.0

9 months ago

2.21.1

10 months ago

2.20.1

11 months ago

2.16.1

1 year ago

2.16.0

1 year ago

2.15.0

1 year ago

2.14.3

1 year ago

2.14.2

1 year ago

2.14.1

1 year ago

2.14.0

1 year ago

2.13.0

1 year ago