From 021319c166cfd34f265d020a28b087bf24cb6f69 Mon Sep 17 00:00:00 2001 From: oabrivard Date: Thu, 26 Mar 2026 12:02:58 +0100 Subject: [PATCH] fix: use import.meta.url instead of __dirname in ESM config Co-Authored-By: Claude Opus 4.6 (1M context) --- e2e/playwright.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 7f80ae9..ee96784 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -1,9 +1,12 @@ import { defineConfig } from '@playwright/test'; import dotenv from 'dotenv'; -import path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname, resolve } from 'path'; // Load e2e/.env.test if it exists (contains OPENAI_TEST_API_KEY) -dotenv.config({ path: path.resolve(__dirname, '.env.test') }); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +dotenv.config({ path: resolve(__dirname, '.env.test') }); /** * Playwright configuration for AI Weekly Synth E2E tests.