@longwoo/sentry-sourcemap-plugin

`@sentry/webpack-plugin` extended webpack plugin.

Usage no npm install needed!

<script type="module">
  import longwooSentrySourcemapPlugin from 'https://cdn.skypack.dev/@longwoo/sentry-sourcemap-plugin';
</script>

README

sentry-sourcemap-plugin

@sentry/webpack-plugin extended webpack plugin.

npm (scoped) GitHub release (latest by date including pre-releases) npm download GitHub license

中文

Sentry automatically deletes the SourceMap file after uploading it Map file.

⚠️ This plugin is configured with some initial values by default::

  • release: '1.0.0', automatically read the version in the current project package.json
  • include: './dist'。
  • configFile: '.sentryclirc'。

Use

Install

💡 @longwoo/sentry-sourcemap-plugin already contains @sentry/webpack-plugin plugin, no need to install it. The configuration is consistent with @sentry/webpack-plugin.

npm install @longwoo/sentry-sourcemap-plugin --save-dev
# or
yarn add @longwoo/sentry-sourcemap-plugin -D

Vue project

Add the following configuration in the vue.config.js file:

const { SentrySourcemapPlugin } = require('@longwoo/sentry-sourcemap-plugin')

module.exports = {
  configureWebpack: config => {
    config.plugins.push(new SentrySourcemapPlugin())
  }
}

Webpack

Added in the plugins option of the webpack.config.js file:

const { SentrySourcemapPlugin } = require('@longwoo/sentry-sourcemap-plugin')

module.exports = {
  plugins: [
    new SentrySourcemapPlugin()
  ]
}