[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:
parent
95c742244e
commit
64f90b828b
7 changed files with 30 additions and 0 deletions
|
|
@ -62,6 +62,7 @@
|
|||
"@types/node": "catalog:",
|
||||
"@types/react": "catalog:",
|
||||
"@types/react-dom": "catalog:",
|
||||
"dotenv": "^16.4.5",
|
||||
"typescript": "catalog:",
|
||||
"vite": "catalog:",
|
||||
"vite-tsconfig-paths": "^5.1.4"
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue