From 96fc26030a043218500501084479662a67cfcf10 Mon Sep 17 00:00:00 2001 From: j8seangel Date: Wed, 4 Sep 2024 12:23:11 +0200 Subject: [PATCH] get API_GATEWAY env from vite --- libs/api-client/src/config.ts | 3 +++ libs/api-client/tsconfig.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/api-client/src/config.ts b/libs/api-client/src/config.ts index 468a9703bc..ab48d545c2 100644 --- a/libs/api-client/src/config.ts +++ b/libs/api-client/src/config.ts @@ -1,7 +1,10 @@ +/// + export const API_GATEWAY = process.env.API_GATEWAY || process.env.REACT_APP_API_GATEWAY || process.env.NEXT_PUBLIC_API_GATEWAY || + import.meta?.env?.API_GATEWAY || // vite bundled libraries 'https://gateway.api.dev.globalfishingwatch.org' export const USER_TOKEN_STORAGE_KEY = 'GFW_API_USER_TOKEN' diff --git a/libs/api-client/tsconfig.json b/libs/api-client/tsconfig.json index e80c80cd29..f79bffae47 100644 --- a/libs/api-client/tsconfig.json +++ b/libs/api-client/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "commonjs", + "module": "es2022", "forceConsistentCasingInFileNames": true, "strict": true, "noImplicitOverride": true,