From 06e2e5591a85b83f92424c63eabb298d7387a1fe Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Tue, 30 May 2023 17:13:45 +0200 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4c3b5d..d4ae6e0 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ This option has the advantage, if you are publishing a React library, to enable You want to avoid this strategy if: - You want your module to be usable with node. The ESM distribution produced by TypeScript is an ESM distribution -that node in `type: module` can process (files need to have `.mjs` extension, exports need to be listed). +that node in `type: module` can't process (files need to have `.mjs` extension, exports need to be listed). As a result your module won't be usable at all on node except through Next.js that will be able to make it work. Note that it will work out of the box in Next.js setup using [the AppDir router](https://nextjs.org/docs/app/building-your-application/routing) but for project using the legacy [pagesRouter](https://nextjs.org/docs/pages/building-your-application/routing) your user will have to add