mirror of
https://github.com/danbulant/Mangades
synced 2026-05-19 04:08:46 +00:00
put it back into svelte layout
This commit is contained in:
parent
75cb7305d8
commit
dba7290871
3 changed files with 19 additions and 18 deletions
|
|
@ -28,6 +28,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@sentry/browser": "^7.25.0",
|
||||
"@sentry/svelte": "^7.25.0",
|
||||
"@sentry/tracing": "^7.25.0",
|
||||
"fflate": "^0.6.10",
|
||||
"streamsaver": "^2.0.6",
|
||||
|
|
|
|||
|
|
@ -2,8 +2,26 @@
|
|||
import { afterNavigate } from "$app/navigation";
|
||||
import { logs } from "$lib/util/logs";
|
||||
import PageTransition from "./pageTransition.svelte";
|
||||
import * as Sentry from '@sentry/svelte';
|
||||
import { BrowserTracing } from "@sentry/tracing";
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
export var data;
|
||||
// @ts-ignore
|
||||
if(import.meta.env.VITE_SENTRY_DSN && browser) {
|
||||
Sentry.init({
|
||||
// @ts-ignore
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
// @ts-ignore
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT,
|
||||
// @ts-ignore
|
||||
release: import.meta.env.VITE_SENTRY_RELEASE,
|
||||
integrations: [
|
||||
new BrowserTracing(),
|
||||
],
|
||||
tracesSampleRate: 1
|
||||
});
|
||||
}
|
||||
|
||||
let skipFirst = true;
|
||||
let last = typeof window !== "undefined" && window.location.pathname;
|
||||
|
|
|
|||
|
|
@ -1,23 +1,5 @@
|
|||
import * as Sentry from '@sentry/browser';
|
||||
import { BrowserTracing } from "@sentry/tracing";
|
||||
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
export function load({ url, event }) {
|
||||
// @ts-ignore
|
||||
if(import.meta.env.VITE_SENTRY_DSN && typeof event !== "undefined" && typeof window !== 'undefined') {
|
||||
Sentry.init({
|
||||
// @ts-ignore
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
// @ts-ignore
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT,
|
||||
// @ts-ignore
|
||||
release: import.meta.env.VITE_SENTRY_RELEASE,
|
||||
integrations: [
|
||||
new BrowserTracing(),
|
||||
],
|
||||
tracesSampleRate: 1
|
||||
});
|
||||
}
|
||||
return {
|
||||
url: url.pathname
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue