Files
everyone-can-use-english/enjoy/src/renderer.ts
an-lee 5ee7c78676 Feat: add tracking (#437)
* add ahoy

* add sentry for error tracking
2024-03-25 10:54:18 +08:00

43 lines
1.1 KiB
TypeScript

/**
* This file will automatically be loaded by vite and run in the "renderer" context.
* To learn more about the differences between the "main" and the "renderer" context in
* Electron, visit:
*
* https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
*
* By default, Node.js integration in this file is disabled. When enabling Node.js integration
* in a renderer process, please be aware of potential security implications. You can read
* more about security risks here:
*
* https://electronjs.org/docs/tutorial/security
*
* To enable Node.js integration in this file, open up `main.ts` and enable the `nodeIntegration`
* flag:
*
* ```
* // Create the browser window.
* mainWindow = new BrowserWindow({
* width: 800,
* height: 600,
* webPreferences: {
* nodeIntegration: true
* }
* });
* ```
*/
import "./index.css";
import "./renderer/index";
import * as Sentry from "@sentry/electron";
import { SENTRY_DSN } from "@/constants";
Sentry.init({
dsn: SENTRY_DSN,
});
declare global {
interface Window {
__ENJOY_APP__: EnjoyAppType;
}
}