diff --git a/README.md b/README.md index 3b7f9e7..67ff3b2 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ # @nearform/playwright-firebase +> [!NOTE] +> This is an ESM only package, please make sure your usage follows the rules of ESM +> User the following [guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#pure-esm-package) to learn more + Tidy way to authenticate Playwright E2E tests on Firebase. Install using npm: diff --git a/index.ts b/index.ts index a8e4ecc..e842c13 100644 --- a/index.ts +++ b/index.ts @@ -7,7 +7,7 @@ import type { PlaywrightWorkerArgs, PlaywrightWorkerOptions } from '@playwright/test' -import { Authentication } from './plugin/Authentication' +import { Authentication } from './plugin/Authentication.js' export type Credentials = { auth: Authentication diff --git a/plugin/Authentication.ts b/plugin/Authentication.ts index 99fc884..30bb3fc 100644 --- a/plugin/Authentication.ts +++ b/plugin/Authentication.ts @@ -3,7 +3,7 @@ import type { FirebaseApp, FirebaseOptions } from 'firebase/app' import type { Auth, User } from 'firebase/auth' import type { Page } from '@playwright/test' -import { addFirebaseScript, getToken } from './auth.setup' +import { addFirebaseScript, getToken } from './auth.setup.js' // Since these are declared in browser modules, it's hard to understand what the types should be. // As such we're defining what shape we're expecting.