From 40ea32aff2f57b2c52aaaa12c058599fc7b81c04 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 16 Apr 2024 15:21:41 -0400 Subject: [PATCH] docs: add note on needed config changes for TypeScript --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 899312399..b96af35cd 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ const { App, createNodeMiddleware } = require("@octokit/app"); +> [!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).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + ```js const app = new App({ appId: 123,