From a5d51e43313ebec66e0ba583e3059ed37fd82dea Mon Sep 17 00:00:00 2001 From: jainvedant392 Date: Fri, 8 Mar 2024 13:35:24 +0530 Subject: [PATCH] removed dotenv --- package-lock.json | 1 - package.json | 1 - vite.config.mts | 7 ++++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c3246fa5ba..497be83b96f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,6 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", - "dotenv": "^16.4.5", "cypress-split": "^1.20.1", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", diff --git a/package.json b/package.json index 9df2357d347..7c5ab561332 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,6 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", - "dotenv": "^16.4.5", "cypress-split": "^1.20.1", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", diff --git a/vite.config.mts b/vite.config.mts index 28b38c919dc..3c2d90c3fa0 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -1,7 +1,6 @@ import { VitePWA } from "vite-plugin-pwa"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; -import 'dotenv/config'; const cdnUrls = process.env.CARE_CDN_URL ?? @@ -11,6 +10,8 @@ const cdnUrls = "http://localhost:4566", ].join(" "); + const local_care_api = process.env.CARE_API ?? "http://localhost:9000"; + export default defineConfig({ envPrefix: "REACT_", plugins: [ @@ -78,7 +79,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: process.env.CARE_API ?? "https://careapi.ohc.network", + target: local_care_api ?? "https://careapi.ohc.network", changeOrigin: true, }, }, @@ -95,7 +96,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: process.env.CARE_API ?? "https://careapi.ohc.network", + target: local_care_api ?? "https://careapi.ohc.network", changeOrigin: true, }, },