focus on electron
This commit is contained in:
parent
32b97f7458
commit
8854cbf9fe
6 changed files with 26 additions and 43 deletions
|
|
@ -126,7 +126,7 @@ const platform: Platform = {
|
|||
setDefaultServer: writeDefaultServerUrl,
|
||||
}
|
||||
|
||||
if (!import.meta.env.DEV && import.meta.env.VITE_SENTRY_DSN) {
|
||||
if (import.meta.env.VITE_SENTRY_DSN) {
|
||||
Sentry.init({
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT ?? import.meta.env.MODE,
|
||||
|
|
@ -136,6 +136,12 @@ if (!import.meta.env.DEV && import.meta.env.VITE_SENTRY_DSN) {
|
|||
platform: "web",
|
||||
},
|
||||
},
|
||||
integrations: (integrations) => {
|
||||
return integrations.filter(
|
||||
(i) =>
|
||||
i.name !== "Breadcrumbs" && !(import.meta.env.OPENCODE_CHANNEL === "prod" && i.name === "GlobalHandlers"),
|
||||
)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
|||
throw new Error(t("error.dev.rootNotFound"))
|
||||
}
|
||||
|
||||
if (!import.meta.env.DEV && import.meta.env.VITE_SENTRY_DSN) {
|
||||
if (import.meta.env.VITE_SENTRY_DSN) {
|
||||
Sentry.init({
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT ?? import.meta.env.MODE,
|
||||
|
|
@ -41,6 +41,12 @@ if (!import.meta.env.DEV && import.meta.env.VITE_SENTRY_DSN) {
|
|||
platform: "desktop-electron",
|
||||
},
|
||||
},
|
||||
integrations: (integrations) => {
|
||||
return integrations.filter(
|
||||
(i) =>
|
||||
i.name !== "Breadcrumbs" && !(import.meta.env.OPENCODE_CHANNEL === "prod" && i.name === "GlobalHandlers"),
|
||||
)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -326,6 +332,8 @@ render(() => {
|
|||
}
|
||||
})
|
||||
|
||||
throw new Error("Test2")
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,19 +43,6 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
|||
throw new Error(t("error.dev.rootNotFound"))
|
||||
}
|
||||
|
||||
if (!import.meta.env.DEV && import.meta.env.VITE_SENTRY_DSN) {
|
||||
Sentry.init({
|
||||
dsn: import.meta.env.VITE_SENTRY_DSN,
|
||||
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT ?? import.meta.env.MODE,
|
||||
release: import.meta.env.VITE_SENTRY_RELEASE ?? `desktop-tauri@${pkg.version}`,
|
||||
initialScope: {
|
||||
tags: {
|
||||
platform: "desktop-tauri",
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
void initI18n()
|
||||
|
||||
let update: Update | null = null
|
||||
|
|
|
|||
|
|
@ -1,28 +1,11 @@
|
|||
import { sentryVitePlugin } from "@sentry/vite-plugin"
|
||||
import { defineConfig } from "vite"
|
||||
import appPlugin from "@opencode-ai/app/vite"
|
||||
|
||||
const host = process.env.TAURI_DEV_HOST
|
||||
const sentry =
|
||||
process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_ORG && process.env.SENTRY_PROJECT
|
||||
? sentryVitePlugin({
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
telemetry: false,
|
||||
release: {
|
||||
name: process.env.SENTRY_RELEASE ?? process.env.VITE_SENTRY_RELEASE,
|
||||
},
|
||||
sourcemaps: {
|
||||
assets: "./dist/**",
|
||||
filesToDeleteAfterUpload: "./dist/**/*.map",
|
||||
},
|
||||
})
|
||||
: false
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [appPlugin, sentry],
|
||||
plugins: [appPlugin],
|
||||
publicDir: "../app/public",
|
||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue