Add sentry auth token to vite
This commit is contained in:
+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