-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the exports of vscode-languageserver-types (#1297)
* Fix the exports of vscode-languageserver-types The `exports` field is needed for dual publishing CJS and ESM. The `module` field on the other hand, is a non-standard property. Some bundlers incorrectly interpret it, causing interop issues. An additional `package.json` file is written to mark the ESM output as actual ESM. * Fix ESM for vscode-languageserver-textdocument * update target to es6 --------- Co-authored-by: Dirk Bäumer <dirkb@microsoft.com> Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
- Loading branch information
1 parent
4e057d5
commit a06b881
Showing
7 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
'use strict'; | ||
//@ts-check | ||
|
||
const fs = require('fs'); | ||
|
||
const pkg = { type: 'module' }; | ||
|
||
fs.writeFileSync('lib/esm/package.json', JSON.stringify(pkg, undefined, 2) + '\n'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters