mirror of
https://github.com/danbulant/Mangades
synced 2026-07-09 04:50:42 +00:00
add sentry
This commit is contained in:
parent
0a157ca3c3
commit
e955149f80
2 changed files with 10 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
"vite-plugin-windicss": "^1.8.8"
|
"vite-plugin-windicss": "^1.8.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@sentry/browser": "^7.25.0",
|
||||||
"fflate": "^0.6.10",
|
"fflate": "^0.6.10",
|
||||||
"streamsaver": "^2.0.6",
|
"streamsaver": "^2.0.6",
|
||||||
"svelte-local-storage-store": "^0.3.1",
|
"svelte-local-storage-store": "^0.3.1",
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,17 @@
|
||||||
import { afterNavigate } from "$app/navigation";
|
import { afterNavigate } from "$app/navigation";
|
||||||
import { logs } from "$lib/util/logs";
|
import { logs } from "$lib/util/logs";
|
||||||
import PageTransition from "./pageTransition.svelte";
|
import PageTransition from "./pageTransition.svelte";
|
||||||
|
import * as Sentry from '@sentry/browser';
|
||||||
|
|
||||||
export var data;
|
export var data;
|
||||||
|
|
||||||
|
if (browser && !dev && import.meta.env.VITE_SENTRY_DSN) {
|
||||||
|
Sentry.init({
|
||||||
|
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||||
|
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT,
|
||||||
|
release: import.meta.env.VITE_SENTRY_RELEASE,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let skipFirst = true;
|
let skipFirst = true;
|
||||||
let last = typeof window !== "undefined" && window.location.pathname;
|
let last = typeof window !== "undefined" && window.location.pathname;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue