webpack-sentry-plugin
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -23,2 +23,6 @@ 'use strict'; | ||
var DEFAULT_TRANSFORM = function DEFAULT_TRANSFORM(filename) { | ||
return filename; | ||
}; | ||
function handleErrors(err, compilation, cb) { | ||
@@ -41,2 +45,4 @@ compilation.errors.push('Sentry Plugin: ' + err); | ||
this.exclude = options.exclude; | ||
this.filenameTransform = options.filenameTransform || DEFAULT_TRANSFORM; | ||
} | ||
@@ -133,3 +139,3 @@ | ||
file: _fs2.default.createReadStream(path), | ||
name: name | ||
name: this.filenameTransform(name) | ||
} | ||
@@ -136,0 +142,0 @@ }); |
{ | ||
"name": "webpack-sentry-plugin", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Webpack plugin to upload source maps to Sentry", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,5 +24,5 @@ # Sentry plugin | ||
```js | ||
```js | ||
var SentryPlugin = require('webpack-sentry-plugin'); | ||
``` | ||
``` | ||
@@ -33,3 +33,3 @@ 2. Configure webpack to output source maps. Recommended reading: [webpack docs](https://webpack.js.org/configuration/devtool/), [Sentry docs](https://docs.sentry.io/clients/javascript/sourcemaps) | ||
```js | ||
```js | ||
var config = { | ||
@@ -50,3 +50,3 @@ plugins: [ | ||
} | ||
``` | ||
``` | ||
@@ -82,5 +82,22 @@ #### Options | ||
``` | ||
- `filenameTransform`: Function to transform filename before uploading to Sentry | ||
```js | ||
var config = { | ||
plugins: [ | ||
new SentryPlugin({ | ||
filenameTransform: function(filename) { | ||
return `a-filename-prefix-${filename}` | ||
} | ||
}) | ||
] | ||
} | ||
``` | ||
- `organisation`: Sentry organisation to upload files to | ||
- `project`: Sentry project to upload files to | ||
- `apiKey`: Sentry api keys. See [Sentry docs](https://docs.sentry.io/clients/javascript/sourcemaps/#uploading-source-maps-to-sentry) for info on how to create one | ||
- `release`: Release name to attach source maps to. Can be string or function that returns a string | ||
@@ -91,3 +108,3 @@ | ||
- Thanks to [@MikaAK](https://github.com/MikaAK) for creating [s3-webpack-plugin](https://github.com/MikaAK/s3-plugin-webpack), which inspired much of this project | ||
- Thanks for [@danharper](https://github.com/danharper) for creating the original build script implementation | ||
- Thanks to [@danharper](https://github.com/danharper) for creating the original build script implementation | ||
@@ -94,0 +111,0 @@ ### Contributing |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10449
123
116