fix(web): provide type in the exports
When using TypeScript projects using other module settings than CommonJs, the types were not correctly exposed, and the compilation failed.
This adds the types path to the exports so compilation works for `module: NodeNext` and other variants.
(cherry picked from commit f95e0e3a56)
This commit is contained in:
parent
637a3e111b
commit
d73126d582
2 changed files with 6 additions and 4 deletions
4
lib/binding_web/package-lock.json
generated
4
lib/binding_web/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "web-tree-sitter",
|
||||
"version": "0.25.0",
|
||||
"version": "0.25.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "web-tree-sitter",
|
||||
"version": "0.25.0",
|
||||
"version": "0.25.1",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
"exports": {
|
||||
".": {
|
||||
"import": "./tree-sitter.js",
|
||||
"require": "./tree-sitter.cjs"
|
||||
"require": "./tree-sitter.cjs",
|
||||
"types": "./web-tree-sitter.d.ts"
|
||||
},
|
||||
"./debug": {
|
||||
"import": "./debug/tree-sitter.js",
|
||||
"require": "./debug/tree-sitter.cjs"
|
||||
"require": "./debug/tree-sitter.cjs",
|
||||
"types": "./web-tree-sitter.d.ts"
|
||||
}
|
||||
},
|
||||
"types": "web-tree-sitter.d.ts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue