Skip to content

Commit 62ffe8d

Browse files
committed
SentryWebpackPlugin
1 parent 3bb1991 commit 62ffe8d

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

.erb/configs/webpack.config.renderer.dev.babel.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import chalk from 'chalk';
55
import { merge } from 'webpack-merge';
66
import { spawn, execSync } from 'child_process';
77
import Dotenv from 'dotenv-webpack';
8+
import SentryWebpackPlugin from '@sentry/webpack-plugin';
9+
810
import baseConfig from './webpack.config.base';
911
import CheckNodeEnv from '../scripts/CheckNodeEnv';
1012
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
@@ -268,6 +270,19 @@ export default merge(baseConfig, {
268270
}),
269271

270272
new ReactRefreshWebpackPlugin(),
273+
274+
new SentryWebpackPlugin({
275+
// sentry-cli configuration - can also be done directly through sentry-cli
276+
// see https://docs.sentry.io/product/cli/configuration/ for details
277+
authToken: process.env.SENTRY_AUTH_TOKEN,
278+
org: 'yadro-inc',
279+
project: 'time-tracker',
280+
release: process.env.SENTRY_RELEASE,
281+
282+
// other SentryWebpackPlugin configuration
283+
include: '../../src',
284+
ignore: ['node_modules', 'dist'],
285+
}),
271286
],
272287

273288
node: {

.erb/configs/webpack.config.renderer.prod.babel.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
1010
import { merge } from 'webpack-merge';
1111
import TerserPlugin from 'terser-webpack-plugin';
1212
import Dotenv from 'dotenv-webpack';
13+
import SentryWebpackPlugin from '@sentry/webpack-plugin';
14+
1315
import baseConfig from './webpack.config.base';
1416
import CheckNodeEnv from '../scripts/CheckNodeEnv';
1517
import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
@@ -185,5 +187,18 @@ export default merge(baseConfig, {
185187
process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
186188
openAnalyzer: process.env.OPEN_ANALYZER === 'true',
187189
}),
190+
191+
new SentryWebpackPlugin({
192+
// sentry-cli configuration - can also be done directly through sentry-cli
193+
// see https://docs.sentry.io/product/cli/configuration/ for details
194+
authToken: process.env.SENTRY_AUTH_TOKEN,
195+
org: 'yadro-inc',
196+
project: 'time-tracker',
197+
release: process.env.SENTRY_RELEASE,
198+
199+
// other SentryWebpackPlugin configuration
200+
include: '../../src',
201+
ignore: ['node_modules'],
202+
}),
188203
],
189204
});

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"strict": true,
1111
"pretty": true,
1212
"sourceMap": true,
13+
"inlineSources": true,
14+
"sourceRoot": "/",
1315
/* Additional Checks */
1416
"noUnusedLocals": true,
1517
"noUnusedParameters": true,

0 commit comments

Comments
 (0)