fix(api): add top-level main, module and types fields (#8268)

This commit is contained in:
Amr Bashir 2023-11-20 23:13:50 +02:00 committed by GitHub
parent c2ad4d28c4
commit 46451aee13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
'@tauri-apps/api': 'patch:bug'
---
Add top-level `main`, `module` and `types` fields in `package.json` to be compliant with typescripts's `"moduleResolution": "node"`

View File

@ -19,6 +19,12 @@
},
"homepage": "https://github.com/tauri-apps/tauri#readme",
"type": "module",
"types": "./types/index.d.ts",
"main": "./index.cjs",
"module": "./index.js",
"exports": {
"./package.json": "./package.json"
},
"scripts": {
"build": "rollup -c --configPlugin typescript",
"npm-pack": "yarn build && cd ./dist && npm pack",
@ -48,9 +54,6 @@
"tslib": "2.6.2",
"typescript": "5.2.2"
},
"exports": {
"./package.json": "./package.json"
},
"engines": {
"node": ">= 18",
"npm": ">= 6.6.0",