mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
Inject sentry release information at runtime not build time
See https://github.com/element-hq/element-call/issues/2871 for context of impact.
This commit is contained in:
@@ -220,6 +220,7 @@ export class Initializer {
|
|||||||
Sentry.reactRouterV5BrowserTracingIntegration({ history }),
|
Sentry.reactRouterV5BrowserTracingIntegration({ history }),
|
||||||
],
|
],
|
||||||
tracesSampleRate: 1.0,
|
tracesSampleRate: 1.0,
|
||||||
|
release: process.env.VITE_APP_VERSION,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Sentry is now 'loadeed' (even if we actually skipped starting
|
// Sentry is now 'loadeed' (even if we actually skipped starting
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
sentryVitePlugin({
|
sentryVitePlugin({
|
||||||
release: {
|
release: {
|
||||||
name: process.env.VITE_APP_VERSION,
|
name: process.env.VITE_APP_VERSION,
|
||||||
|
// We don't inject the release info at build time because it has a side effect of
|
||||||
|
// changing the asset hashes each time meaning that it breaks browser caching.
|
||||||
|
// Instead we pass it in at runtime via Sentry.init().
|
||||||
|
inject: false,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user