From 92ea1b2e3f72cd5108b872d83554b06eee544a37 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Thu, 16 May 2024 11:26:57 -0400 Subject: [PATCH] docs: mention additional requirement for TS closes #867 --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05a367841..6a0d7b000 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,10 @@ npm add graphql-request graphql #### TypeScript Setup -This package uses [`package.exports`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). Therefore if you are a TypeScript user you must also have your `tsconfig.json` `moduleResolution` set to [`bundler`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler) or [`node16`/`nodenext`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-nodenext-1). +This package uses [`package.exports`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports). Therefore if you are a TypeScript user you must: + +1. have your `tsconfig.json` `moduleResolution` set to [`"bundler"`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler) or [`"node16"`/`"nodenext"`](https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-nodenext-1). +2. Have your `package.json` `type` set to `"module"`. ## Quick Start