From 83696343b6372b5636e35948da5122de71006e77 Mon Sep 17 00:00:00 2001 From: Tom Jeatt Date: Wed, 17 Jul 2024 12:19:01 +0100 Subject: [PATCH 1/3] fix: sentry config --- apps/evm/.env.example | 3 +-- apps/evm/vite.config.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/evm/.env.example b/apps/evm/.env.example index 2cb8ff363..3619e9d8c 100644 --- a/apps/evm/.env.example +++ b/apps/evm/.env.example @@ -9,8 +9,7 @@ VITE_BTC_API_URL="https://btc-testnet.gobob.xyz" VITE_FEATURE_FLAG_BTC_ONRAMP=disabled VITE_INDEXER_BRIDGE_URL="" VITE_SENTRY_URL="" -VITE_SENTRY_AUTH_TOKEN="" - +SENTRY_AUTH_TOKEN="" /* MAINNET */ VITE_ONRAMP_API_URL="https://onramp-api-mainnet.gobob.xyz" diff --git a/apps/evm/vite.config.ts b/apps/evm/vite.config.ts index 24b41633b..ba5c1d849 100644 --- a/apps/evm/vite.config.ts +++ b/apps/evm/vite.config.ts @@ -14,10 +14,10 @@ export default defineConfig(({ mode }) => { nodePolyfills(), wasm(), sentryVitePlugin({ - applicationKey: 'bob-ui-application-key', - authToken: env.VITE_SENTRY_AUTH_TOKEN, org: 'distributed-crafts', - project: 'bob-ui' + project: 'bob-ui', + applicationKey: 'bob-ui-application-key', + authToken: process.env.SENTRY_AUTH_TOKEN }) ], build: { From 5099a49cd348c79de0a6c30a064fe7b558ed52d2 Mon Sep 17 00:00:00 2001 From: Tom Jeatt Date: Wed, 17 Jul 2024 12:36:29 +0100 Subject: [PATCH 2/3] chore: remove example env file --- apps/evm/.env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/evm/.env.example b/apps/evm/.env.example index 3619e9d8c..82b2c7cda 100644 --- a/apps/evm/.env.example +++ b/apps/evm/.env.example @@ -9,7 +9,6 @@ VITE_BTC_API_URL="https://btc-testnet.gobob.xyz" VITE_FEATURE_FLAG_BTC_ONRAMP=disabled VITE_INDEXER_BRIDGE_URL="" VITE_SENTRY_URL="" -SENTRY_AUTH_TOKEN="" /* MAINNET */ VITE_ONRAMP_API_URL="https://onramp-api-mainnet.gobob.xyz" From b5b2837e0078ca1869ff4be1a945fe23ba36f350 Mon Sep 17 00:00:00 2001 From: Tom Jeatt Date: Wed, 17 Jul 2024 13:19:31 +0100 Subject: [PATCH 3/3] chore: vite config --- apps/evm/vite.config.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/evm/vite.config.ts b/apps/evm/vite.config.ts index ba5c1d849..a5d515b71 100644 --- a/apps/evm/vite.config.ts +++ b/apps/evm/vite.config.ts @@ -6,9 +6,18 @@ import wasm from 'vite-plugin-wasm'; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { - const env = loadEnv(mode, process.cwd()); + // Load env file based on `mode` in the current working directory. + // Set the third parameter to '' to load all env regardless of the `VITE_` prefix. + const env = loadEnv(mode, process.cwd(), ''); return { + define: { + __APP_ENV__: JSON.stringify(env.APP_ENV) + }, + build: { + target: 'esnext', + sourcemap: true // Source map generation must be turned on + }, plugins: [ react(), nodePolyfills(), @@ -20,10 +29,6 @@ export default defineConfig(({ mode }) => { authToken: process.env.SENTRY_AUTH_TOKEN }) ], - build: { - target: 'esnext', - sourcemap: true // Source map generation must be turned on - }, server: { proxy: { '/api': {