-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathvite.config.js
45 lines (40 loc) · 1.03 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { defineConfig, loadEnv } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
import pkg from './package.json';
const config = ({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd(), '') };
const sentryConfig = {
sourceMapsUploadOptions: {
org: 'that-conference',
project: 'that-us',
release: pkg.version,
authToken: process.env.SENTRY_SRC_MAP_UPLOAD,
url: 'https://sentry.io',
cleanArtifacts: true,
rewrite: false,
// vite overrides NODE_ENV to production when running 'vite build'
uploadSourceMaps: process.env.PUBLIC_VERCEL_ENV === 'production',
deploy: {
env: 'production'
},
setCommits: {
auto: true,
ignoreMissing: true
},
sourceMaps: {
assets: ['./.svelte-kit/output'],
ignore: ['node_modules']
},
debug: false,
dryRun: false
}
};
return defineConfig({
plugins: [sentrySvelteKit(sentryConfig), sveltekit()],
build: {
sourcemap: true
}
});
};
export default config;