https://github.com/lms24/nx-angular-sentry
Example repo for setting up Sentry and the Sentry WebPack Plugin in an @nx/angular project
https://github.com/lms24/nx-angular-sentry
angular nx sentry webpack
Last synced: about 2 months ago
JSON representation
Example repo for setting up Sentry and the Sentry WebPack Plugin in an @nx/angular project
- Host: GitHub
- URL: https://github.com/lms24/nx-angular-sentry
- Owner: Lms24
- Created: 2023-06-01T08:27:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T08:39:05.000Z (about 3 years ago)
- Last Synced: 2024-10-04T21:41:23.833Z (over 1 year ago)
- Topics: angular, nx, sentry, webpack
- Language: TypeScript
- Homepage:
- Size: 888 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Set Up Sentry in an `@nx/angular` Project
Follow [this guide](https://github.com/getsentry/sentry-javascript/issues/8267#issuecomment-1571587669) for detailed setup instructions
## Modified files for Sentry setup
* [`src/main.ts`](https://github.com/Lms24/nx-angular-sentry/blob/main/src/main.ts) to init Sentry in the app
* [`src/app/app.config.ts`](https://github.com/Lms24/nx-angular-sentry/blob/main/src/app/app.config.ts) to provide Sentry `ErrorHandler` and `TraceService`
* [`project.json`](https://github.com/Lms24/nx-angular-sentry/blob/main/project.json) to register custom webpack config and enable source maps
* [`webpack.config.js`](https://github.com/Lms24/nx-angular-sentry/blob/main/webpack.config.js) to register and configure the Sentry webpack plugin
* [`src/app/sentry/*`](https://github.com/Lms24/nx-angular-sentry/tree/main/src/app/sentry) a small component that throws a sample error
## Example
The result is a correctly source-mapped Sentry error with an injected release
