Skip to content

Commit

Permalink
fix(docs): update for ESM (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 authored Jun 11, 2024
1 parent a52c8e8 commit d9440be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ Node
Install with `npm install @octokit/auth-callback`

```js
const { createCallbackAuth } = require("@octokit/auth-callback");
import { createCallbackAuth } from "@octokit/auth-callback";
```

</td></tr>
</tbody>
</table>

> [!IMPORTANT]
> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`.
>
> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>
> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)
```js
let token;

Expand Down

0 comments on commit d9440be

Please sign in to comment.