Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
webpack-sentry-plugin
Advanced tools
A webpack (v1 or 2) plugin to upload source maps to Sentry.
Using npm:
$ npm install webpack-sentry-plugin --save-dev
Using yarn:
$ yarn add webpack-sentry-plugin --dev
Require webpack-sentry-plugin
:
var SentryPlugin = require('webpack-sentry-plugin');
Configure webpack to output source maps. Recommended reading: webpack docs, Sentry docs
Add to webpack config:
var config = {
plugins: [
new SentryPlugin({
// Sentry options are required
organisation: 'your-organisation-name',
project: 'your-project-name',
apiKey: process.env.SENTRY_API_KEY,
// Release version name/hash is required
release: function() {
return process.env.GIT_SHA
}
})
]
}
exclude
: RegExp to match for excluded files
var config = {
plugins: [
new SentryPlugin({
// Exclude uploading of html
exclude: /\.html$/,
...
})
]
}
include
: RegExp to match for included files
var config = {
plugins: [
new SentryPlugin({
// Only upload foo.js & foo.js.map
include: /foo.js/,
...
})
]
}
filenameTransform
: Function to transform filename before uploading to Sentry. Defaults to prefixing filename with ~/
, which is used by Sentry as a host wildcard
var config = {
plugins: [
new SentryPlugin({
filenameTransform: function(filename) {
return 'a-filename-prefix-' + filename
}
})
]
}
release
: Release name to attach source maps to. Can be string or function that returns a string. If a function is passed, it will receive the build hash as an argument
var config = {
plugins: [
new SentryPlugin({
release: function(hash) {
return hash
}
})
]
}
suppressErrors
: Display warnings instead of failing webpack build - useful in case webpack compilation is done during deploy on multiple instances
baseSentryURL
: URL of Sentry instance. Shouldn't need to set if using sentry.io, but useful if self hosting
deleteAfterCompile
: Boolean determining whether source maps should be deleted after the webpack compile finishes. Defaults to false
organisation
: Sentry organisation to upload files to
project
: Sentry project to upload files to
apiKey
: Sentry api key (Generate one here, ensure that project:write
is selected under scopes)
Contributions are welcome 😄. To run the tests, please ensure you have the relevant environment variables set up. You can cp .env.example .env
and fill it in with test account credentials. An API key can be created here, assuming you are signed in.
Warning ⚠️: The test suite will create releases & upload files. They should be cleaned up afterward, but ensure that you are not overwriting something important!
npm start
: List available commands (in green at bottom)npm test
: Runs the test suitenpm start lint
: Runs lintingnpm start format
: Formats code with prettier-eslintFAQs
Webpack plugin to upload source maps to Sentry
The npm package webpack-sentry-plugin receives a total of 3,489 weekly downloads. As such, webpack-sentry-plugin popularity was classified as popular.
We found that webpack-sentry-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.