Skip to content

Commit

Permalink
Sentry fixes and cleanup frontend commands
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Mar 19, 2024
1 parent 6510fbf commit de31914
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"node": ">=20.0.0"
},
"scripts": {
"dev": "import-meta-env-prepare -x ./.env.local.defaults && vite",
"build": "import-meta-env-prepare -x ./.env.local.defaults && vite build && import-meta-env -x .env.example -p dist/index.html",
"env-prepare": "import-meta-env-prepare -x ./.env.local.defaults",
"dev": "npm run env-prepare && vite",
"build": "npm run env-prepare && vite build && import-meta-env -x .env.example -p dist/index.html",
"build:with-sourcemaps": "vite build --sourcemap",
"tsc": "tsc",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 10000",
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { useEffect } from "react";
import { init, reactRouterV6BrowserTracingIntegration, replayIntegration } from "@sentry/react";
import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-dom";
import { captureConsoleIntegration, debugIntegration, httpClientIntegration } from "@sentry/integrations";
import packageJson from '../package.json';

const version = packageJson.version;

const initSentry = () => {
const FRONTEND_SENTRY_DSN = import.meta.env.FRONTEND_SENTRY_DSN
const viteMode = import.meta.env.MODE
const isDev = import.meta.env.DEV
// const release = "rapportnav2@" + process.env.npm_package_version
const release = "rapportnav2@" + "1"
const release = version

init({
dsn: FRONTEND_SENTRY_DSN,
Expand Down

0 comments on commit de31914

Please sign in to comment.