-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): Add Sentry Integeration (#133)
- Loading branch information
1 parent
f0c2dcb
commit 5ae2c92
Showing
7 changed files
with
107 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
const { composePlugins, withNx } = require('@nx/webpack') | ||
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin') | ||
|
||
// Nx plugins for webpack. | ||
module.exports = composePlugins( | ||
withNx({ | ||
target: 'node' | ||
target: 'node', | ||
devtool: 'source-map', | ||
plugins: [ | ||
...(process.env.SENTRY_ENV === 'production' || | ||
process.env.SENTRY_ENV === 'stage' | ||
? [ | ||
sentryWebpackPlugin({ | ||
org: process.env.SENTRY_ORG, | ||
project: process.env.SENTRY_PROJECT, | ||
authToken: process.env.SENTRY_AUTH_TOKEN | ||
}) | ||
] | ||
: []) | ||
] | ||
}), | ||
(config) => { | ||
// Update the webpack config as needed here. | ||
// e.g. `config.plugins.push(new MyPlugin())` | ||
return config | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters