From 15596373b6922f5fb3afc4b134359d6319245ef4 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Fri, 9 Feb 2024 10:06:28 +0100 Subject: [PATCH] Use module export condition for types and textdocument (#1386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use module export condition for types and textdocument The `module` export condition is an unofficial export condition that’s respected by bundlers. It tells the bundler to resolve to an entrypoint, regardless of whether a module is imported or `require`d. This was the original intent of the `browser` condition when it was added. * Restore the browser export conditions --------- Co-authored-by: Dirk Bäumer --- textDocument/package.json | 1 + types/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/textDocument/package.json b/textDocument/package.json index cf7a4ea1b..84b295232 100644 --- a/textDocument/package.json +++ b/textDocument/package.json @@ -17,6 +17,7 @@ "exports": { ".": { "browser": "./lib/esm/main.js", + "module": "./lib/esm/main.js", "import": "./lib/esm/main.js", "default": "./lib/umd/main.js" } diff --git a/types/package.json b/types/package.json index a97929090..9bcc82f15 100644 --- a/types/package.json +++ b/types/package.json @@ -17,6 +17,7 @@ "exports": { ".": { "browser": "./lib/esm/main.js", + "module": "./lib/esm/main.js", "import": "./lib/esm/main.js", "default": "./lib/umd/main.js" }