Skip to content

Commit

Permalink
build: config Sentry release and dist
Browse files Browse the repository at this point in the history
  • Loading branch information
gander committed Nov 22, 2024
1 parent 932a031 commit 1985845
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

interface ImportMetaEnv {
readonly VITE_APP_VERSION: string
readonly VITE_COMMIT_SHA: string
readonly VITE_UMAMI_ID: string
readonly VITE_UMAMI_SRC: string
readonly VITE_SENTRY_DSN: string;
Expand Down
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {createApp} from 'vue';
import 'bootstrap/scss/bootstrap.scss';
import App from './App.vue';
import * as Sentry from '@sentry/vue';
import { H } from 'highlight.run';
import {H} from 'highlight.run';

H.init('ng2zo5pg', {
environment: 'production',
Expand Down Expand Up @@ -36,7 +36,8 @@ if (import.meta.env.PROD && import.meta.env.VITE_SENTRY_DSN) {
}
return event;
},

release: import.meta.env.VITE_APP_VERSION,
dist: import.meta.env.VITE_COMMIT_SHA,
});
}

Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import HtmlPlugin, {IHTMLTag, ScriptTag} from 'vite-plugin-html-config';
// https://vitejs.dev/config/
export default defineConfig(({command}) => {
process.env.VITE_APP_VERSION = process.env.npm_package_version;
process.env.VITE_COMMIT_SHA = process.env.CF_PAGES_COMMIT_SHA;

const headScripts: ScriptTag[] = [];

Expand Down

0 comments on commit 1985845

Please sign in to comment.