Skip to content

Commit 46451ae

Browse files
authored
fix(api): add top-level main, module and types fields (#8268)
1 parent c2ad4d2 commit 46451ae

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tauri-apps/api': 'patch:bug'
3+
---
4+
5+
Add top-level `main`, `module` and `types` fields in `package.json` to be compliant with typescripts's `"moduleResolution": "node"`

tooling/api/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
},
2020
"homepage": "https://github.com/tauri-apps/tauri#readme",
2121
"type": "module",
22+
"types": "./types/index.d.ts",
23+
"main": "./index.cjs",
24+
"module": "./index.js",
25+
"exports": {
26+
"./package.json": "./package.json"
27+
},
2228
"scripts": {
2329
"build": "rollup -c --configPlugin typescript",
2430
"npm-pack": "yarn build && cd ./dist && npm pack",
@@ -48,9 +54,6 @@
4854
"tslib": "2.6.2",
4955
"typescript": "5.2.2"
5056
},
51-
"exports": {
52-
"./package.json": "./package.json"
53-
},
5457
"engines": {
5558
"node": ">= 18",
5659
"npm": ">= 6.6.0",

0 commit comments

Comments
 (0)