(mode: string)
| 10 | const appRoot = fileURLToPath(new URL(".", import.meta.url)); |
| 11 | |
| 12 | const loadServerEnv = (mode: string) => { |
| 13 | const env = loadEnv(mode, appRoot, ""); |
| 14 | |
| 15 | for (const [key, value] of Object.entries(env)) { |
| 16 | if (process.env[key] === undefined) { |
| 17 | process.env[key] = value; |
| 18 | } |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | // Plugin required to serve the chat endpoint in dev. |
| 23 | // In production, it will be bundled and served by Vercel. |