Skip to content

Commit 6d2aaf5

Browse files
author
Siddharth Gelera (reaper)
authored
Merge pull request #229 from nearform/fix/179-require-of-es-mod
Fixes: require() of ES Module not supported
2 parents a6c6d1b + 8c43dc3 commit 6d2aaf5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# @nearform/playwright-firebase
44

5+
> [!NOTE]
6+
> This is an ESM only package, please make sure your usage follows the rules of ESM
7+
> User the following [guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#pure-esm-package) to learn more
8+
59
Tidy way to authenticate Playwright E2E tests on Firebase.
610

711
Install using npm:

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
PlaywrightWorkerArgs,
88
PlaywrightWorkerOptions
99
} from '@playwright/test'
10-
import { Authentication } from './plugin/Authentication'
10+
import { Authentication } from './plugin/Authentication.js'
1111

1212
export type Credentials = {
1313
auth: Authentication

plugin/Authentication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FirebaseApp, FirebaseOptions } from 'firebase/app'
33
import type { Auth, User } from 'firebase/auth'
44
import type { Page } from '@playwright/test'
55

6-
import { addFirebaseScript, getToken } from './auth.setup'
6+
import { addFirebaseScript, getToken } from './auth.setup.js'
77

88
// Since these are declared in browser modules, it's hard to understand what the types should be.
99
// As such we're defining what shape we're expecting.

0 commit comments

Comments
 (0)