Skip to content

Commit

Permalink
fix(api): add top-level main, module and types fields (#8268)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Nov 20, 2023
1 parent c2ad4d2 commit 46451ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/api-top-level-main-module.md
Original file line number Diff line number Diff line change
@@ -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"`
9 changes: 6 additions & 3 deletions tooling/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -48,9 +54,6 @@
"tslib": "2.6.2",
"typescript": "5.2.2"
},
"exports": {
"./package.json": "./package.json"
},
"engines": {
"node": ">= 18",
"npm": ">= 6.6.0",
Expand Down

0 comments on commit 46451ae

Please sign in to comment.