Skip to content

Commit

Permalink
fix(playwright): add exports in auth-client cjs dist
Browse files Browse the repository at this point in the history
Because:
 - Playwright still cannot resolve the auth-client module

This commit:
 - adds a package.json with exports mapping
  • Loading branch information
chenba committed Jul 24, 2023
1 parent 31f2b5d commit 32dfc2c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/fxa-auth-client/.cjs.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "fxa-auth-client",
"type": "commonjs",
"exports": {
".": "./server.js",
"./lib/client": "./client.js",
"./lib/crypto": "./lib/crypto.js",
"./lib/hawk": "./lib/hawk.js",
"./lib/recoveryKey": "./lib/recoveryKey.js",
"./lib/utils": "./lib/utils.js",
"./lib/*": "./lib/*.js"
}
}
2 changes: 1 addition & 1 deletion packages/fxa-auth-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"lint": "eslint . --ext .ts",
"postinstall": "(tsc --build tsconfig.browser.json && tsc --build) || true",
"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",
"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",
"compile": "tsc --noEmit",
"ts-check": "tsc --noEmit",
"test": "mocha -r esbuild-register test/*",
Expand Down

0 comments on commit 32dfc2c

Please sign in to comment.