Add sentry auth token to vite
This commit is contained in:
@@ -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=
|
||||
```
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+20
-8
@@ -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"
|
||||
})],
|
||||
});
|
||||
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
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user