mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-03 18:43:04 +00:00 
			
		
		
		
	* 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
		
			
				
	
	
		
			25 lines
		
	
	
		
			539 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			539 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
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 ?? {}),
 | 
						|
  });
 | 
						|
});
 |