diff --git a/README.md b/README.md index 3064d6f0..8da30d52 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,20 @@ npm i --legacy-peer-deps --registry=https://registry.npmjs.org ``` Note: Make sure you are using Node 18 + +## Environment variable + +``` +PUBLIC_SUPABASE_ANON_KEY= +PUBLIC_SUPABASE_URL= +NETLIFY_API_KEY= +MIXPANEL_TOKEN= +OPENAI_API_KEY= +CLOUDFLARE_TOKEN_VALUE= +CLOUDFLARE_ACCESS_KEY= +CLOUDFLARE_SECRET_ACCESS_KEY= +CLOUDFLARE_ACCOUNT_ID= +CLOUDFLARE_PUBLIC_ACCOUNT_ID= +MUSE_API_KEY= +VITE_SENTRY_AUTH_TOKEN= +``` diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 19d2ce5d..61dcc96a 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -62,7 +62,7 @@ // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production - tracesSampleRate: 1.0 + tracesSampleRate: 0.5 }); } } diff --git a/vite.config.ts b/vite.config.ts index e16df0ff..31ac4118 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,22 @@ -import { sentryVitePlugin } from "@sentry/vite-plugin"; +import { sentryVitePlugin } from '@sentry/vite-plugin'; import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; +import { defineConfig, loadEnv } from 'vite'; -export default defineConfig({ - plugins: [sveltekit(), sentryVitePlugin({ - org: "the-next-greats", - project: "classroomio" - })], -}); \ No newline at end of file +export default ({ mode }) => { + process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }; + + return defineConfig({ + plugins: [ + sveltekit(), + sentryVitePlugin({ + url: 'https://sentry.io', + authToken: process.env.VITE_SENTRY_AUTH_TOKEN, + org: 'the-next-greats', + project: 'classroomio' + }) + ], + build: { + sourcemap: true + } + }); +};