-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add package.json main field for TypeScript plugin
Although the `exports` field should be sufficient, some TypeScript integrations still rely on the `main` field. See #474 (comment)
- Loading branch information
1 parent
8240ab1
commit 6c12960
Showing
4 changed files
with
23 additions
and
4 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,5 @@ | ||
--- | ||
'@mdx-js/typescript-plugin': patch | ||
--- | ||
|
||
Add the main field |
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,5 @@ | ||
--- | ||
'@mdx-js/typescript-plugin': patch | ||
--- | ||
|
||
Emit type declarations |
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 |
---|---|---|
|
@@ -13,9 +13,14 @@ | |
"author": "Remco Haszing <[email protected]>", | ||
"funding": "https://opencollective.com/unified", | ||
"license": "MIT", | ||
"exports": "./lib/index.cjs", | ||
"main": "./lib/index.cjs", | ||
"exports": { | ||
"types": "./types/index.d.cts", | ||
"default": "./lib/index.cjs" | ||
}, | ||
"files": [ | ||
"lib" | ||
"lib", | ||
"types" | ||
], | ||
"keywords": [ | ||
"IntelliSense", | ||
|
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"include": ["lib"], | ||
"references": [{"path": "../language-service/tsconfig.build.json"}], | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
// https://github.com/microsoft/TypeScript/issues/57652 | ||
"resolveJsonModule": true | ||
"resolveJsonModule": true, | ||
"outDir": "types", | ||
"rootDir": "lib" | ||
} | ||
} |