fix(sync): harden Dropbox loading

This commit is contained in:
Christian Vidal Wolf
2026-05-21 13:58:52 +02:00
parent fa998ec9bf
commit 290b298544
2 changed files with 45 additions and 57 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ async function readJsonBody(req: any): Promise<any> {
export default defineConfig(({mode}) => {
const env = loadEnv(mode, '.', '');
const prodEnv = loadEnv('production', '.', '');
return {
plugins: [
react(),
@@ -44,7 +45,7 @@ export default defineConfig(({mode}) => {
const config = getBcConfig(env);
// Populate process.env with loaded env variables for serverless handlers
Object.assign(process.env, env);
Object.assign(process.env, prodEnv, env);
// Helper to adapt Node.js req/res to Vercel signature
const adaptVercelHandler = async (handler: any) => {