Forráskód Böngészése

fix(api): add `exports` field to package.json to keep old interface (#1185)

Lucas Fernandes Nogueira 4 éve
szülő
commit
a6aa65bf3f
1 módosított fájl, 12 hozzáadás és 1 törlés
  1. 12 1
      api/package.json

+ 12 - 1
api/package.json

@@ -2,7 +2,18 @@
   "name": "@tauri-apps/api",
   "version": "0.1.0",
   "description": "Tauri API definitions",
-  "main": "./dist/index",
+  "main": "./dist/index.js",
+  "exports": {
+    ".": "./dist/index.js",
+    "./cli": "./dist/cli.js",
+    "./dialog": "./dist/dialog.js",
+    "./event": "./dist/event.js",
+    "./fs": "./dist/fs.js",
+    "./http": "./dist/http.js",
+    "./notification": "./dist/notification.js",
+    "./tauri": "./dist/tauri.js",
+    "./window": "./dist/window.js"
+  },
   "funding": {
     "type": "opencollective",
     "url": "https://opencollective.com/tauri"