Skip to content

Commit

Permalink
Use module export condition for types and textdocument (#1386)
Browse files Browse the repository at this point in the history
* 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 <dirkb@microsoft.com>
  • Loading branch information
remcohaszing and dbaeumer authored Feb 9, 2024
1 parent 4c8115f commit 1559637
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions textDocument/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 1 addition & 0 deletions types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 1559637

Please sign in to comment.