A Serverless v1.x plugin for use with serverless-webpack which automatically manages your Sentry releases and source map uploads.
npm install serverless-webpack-sentry --save-dev
Add the plugin to your serverless.yml
file:
# serverless.yml
plugins:
- serverless-webpack-sentry
Also configure serverless-webpack
to leave generated artifacts on disk. This is necessary so that they can be uploaded to Sentry:
# serverless.yml
custom:
webpack:
keepOutputDirectory: true
In the root directory of your serverless service, create a .sentryclirc
file:
; .sentryclirc
[defaults]
org=<your organization name>
project=<your project name>
[auth]
token=<your auth token>
The configuration of the plugin is done by defining a custom:sentry
object in your serverless.yml
file with your specific configuration. All settings are optional and will be set to reasonable defaults if missing.
See the sections below for detailed descriptions of the settings. The defaults are:
custom:
sentry:
rewriteSourceMaps: false
Coming soon.
Special thanks goes to the authors of serverless-webpack, which provided the foundation and a template for this project.
Coming soon.