Skip to content

Commit

Permalink
refactor: sourcemap settings for sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
brettski committed Sep 29, 2023
1 parent 20602c0 commit 23ac46c
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@ const config = ({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd(), '') };

const sentryConfig = {
url: 'https://sentry.io',
authToken: process.env.SENTRY_SRC_MAP_UPLOAD,
org: 'that-conference',
project: 'thatconference-com',
release: pkg.version,
deploy: {
env: 'production'
},
setCommits: {
auto: true,
ignoreMissing: true
},
sourceMaps: {
include: ['./.svelte-kit/output'],
ignore: ['node_modules'],
validate: true
},
debug: false,
dryRun: false,
cleanArtifacts: true
sourceMapsUploadOptions: {
url: 'https://sentry.io',
authToken: process.env.SENTRY_SRC_MAP_UPLOAD,
org: 'that-conference',
project: 'thatconference-com',
release: pkg.version,
setCommits: {
auto: true,
ignoreMissing: true
},
sourceMaps: {
assets: ['./.svelte-kit/output'],
ignore: ['node_modules'],
validate: true
},
deploy: {
env: 'production'
},
debug: false,
dryRun: false,
cleanArtifacts: true
}
};

return defineConfig({
Expand All @@ -41,3 +43,6 @@ const config = ({ mode }) => {
};

export default config;

// Sentry vite plugin reference:
// https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/259018857f1fd58b29a8fa92fa573953a9c30fca/packages/vite-plugin

0 comments on commit 23ac46c

Please sign in to comment.