Consolidate env at repo root
- Move all application env vars to repository-root .env (with .env.example as the committed template) and drop the per-app .env.example files. - Add @code/env subpaths (agent, convex) and consume validated exports everywhere instead of reading process.env directly. - Wire every dev/build/start script to load ../../.env via bun --env-file and point vite.config.ts envDir at the repo root.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
"@tanstack/react-form": "catalog:",
|
||||
"better-auth": "catalog:",
|
||||
"convex": "catalog:",
|
||||
"dotenv": "catalog:",
|
||||
"isbot": "^5.1.44",
|
||||
"lucide-react": "catalog:",
|
||||
"next-themes": "catalog:",
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import path from "node:path";
|
||||
|
||||
import { reactRouter } from "@react-router/dev/vite";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { defineConfig } from "vite-plus";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
export default defineConfig({
|
||||
envDir: path.resolve(import.meta.dirname, "../.."),
|
||||
plugins: [tailwindcss(), reactRouter(), tsconfigPaths()],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user