Go for a more generic js bundling architecture

* Don't tie the output name to webpack itself
* Don't call js bundling webpack in python code
* Make the doc more generic about js bundling
This commit is contained in:
2024-11-18 15:36:05 +01:00
committed by Bartuccio Antoine
parent 3db1f592e2
commit 7b41051d0d
56 changed files with 73 additions and 73 deletions

View File

@ -0,0 +1,24 @@
import { exportToHtml } from "#core:utils/globals";
// biome-ignore lint/style/noNamespaceImport: this is the recommended way from the documentation
import * as Sentry from "@sentry/browser";
interface LoggedUser {
name: string;
email: string;
}
interface SentryOptions {
dsn: string;
eventId: string;
user?: LoggedUser;
}
exportToHtml("loadSentryPopup", (options: SentryOptions) => {
Sentry.init({
dsn: options.dsn,
});
Sentry.showReportDialog({
eventId: options.eventId,
...(options.user ?? {}),
});
});