Skip to content

Commit 32dfc2c

Browse files
committed
fix(playwright): add exports in auth-client cjs dist
Because: - Playwright still cannot resolve the auth-client module This commit: - adds a package.json with exports mapping
1 parent 31f2b5d commit 32dfc2c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "fxa-auth-client",
3+
"type": "commonjs",
4+
"exports": {
5+
".": "./server.js",
6+
"./lib/client": "./client.js",
7+
"./lib/crypto": "./lib/crypto.js",
8+
"./lib/hawk": "./lib/hawk.js",
9+
"./lib/recoveryKey": "./lib/recoveryKey.js",
10+
"./lib/utils": "./lib/utils.js",
11+
"./lib/*": "./lib/*.js"
12+
}
13+
}

packages/fxa-auth-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"scripts": {
3636
"lint": "eslint . --ext .ts",
3737
"postinstall": "(tsc --build tsconfig.browser.json && tsc --build) || true",
38-
"build": "tsc --build tsconfig.browser.json && tsc --build && tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > ./dist/server/cjs/packages/fxa-auth-client/package.json",
38+
"build": "tsc --build tsconfig.browser.json && tsc --build && tsc --build tsconfig.cjs.json && cp .cjs.package.json ./dist/server/cjs/packages/fxa-auth-client/package.json",
3939
"compile": "tsc --noEmit",
4040
"ts-check": "tsc --noEmit",
4141
"test": "mocha -r esbuild-register test/*",

0 commit comments

Comments
 (0)