[WEB-5419] chore: add dotenv dependency, hosts and configure environment variables in admin, space, and web apps (#8107)

* chore: add dotenv dependency and configure environment variables in admin, space, and web apps

* chore: allowed multiple hosts in dev mode

* chore: move dotenv to dev deps

* chore: update Vite configuration to set server host to 127.0.0.1 for admin, space, and web apps

---------

Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
This commit is contained in:
Prateek Shourya 2025-11-13 17:57:47 +05:30 committed by GitHub
parent 95c742244e
commit 64f90b828b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 0 deletions

View file

@ -1,9 +1,12 @@
import path from "node:path";
import { reactRouter } from "@react-router/dev/vite";
import dotenv from "dotenv";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { joinUrlPath } from "@plane/utils";
dotenv.config({ path: path.resolve(__dirname, ".env") });
// Expose only vars starting with VITE_
const viteEnv = Object.keys(process.env)
.filter((k) => k.startsWith("VITE_"))
@ -32,4 +35,7 @@ export default defineConfig(() => ({
},
dedupe: ["react", "react-dom"],
},
server: {
host: "127.0.0.1",
},
}));