mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-17 16:26:31 +00:00
patch: fix Sentry DSN for main process
This commit is contained in:
parent
62ac0b98b9
commit
4ffda6e208
@ -61,6 +61,13 @@ const rules: Required<ModuleOptions>['rules'] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const injectAnalyticsToken = new DefinePlugin({
|
||||||
|
'process.env.SENTRY_TOKEN': JSON.stringify(process.env.SENTRY_TOKEN || ''),
|
||||||
|
'process.env.AMPLITUDE_TOKEN': JSON.stringify(
|
||||||
|
process.env.AMPLITUDE_TOKEN || '',
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
export const rendererConfig: Configuration = {
|
export const rendererConfig: Configuration = {
|
||||||
module: {
|
module: {
|
||||||
rules,
|
rules,
|
||||||
@ -79,15 +86,7 @@ export const rendererConfig: Configuration = {
|
|||||||
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
||||||
raw: true,
|
raw: true,
|
||||||
}),
|
}),
|
||||||
// Inject the analytics key into the code
|
injectAnalyticsToken,
|
||||||
new DefinePlugin({
|
|
||||||
'process.env.SENTRY_TOKEN': JSON.stringify(
|
|
||||||
process.env.SENTRY_TOKEN || '',
|
|
||||||
),
|
|
||||||
'process.env.AMPLITUDE_TOKEN': JSON.stringify(
|
|
||||||
process.env.AMPLITUDE_TOKEN || '',
|
|
||||||
),
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -109,4 +108,5 @@ export const mainConfig: Configuration = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
|
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
|
||||||
},
|
},
|
||||||
|
plugins: [injectAnalyticsToken],
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user