浏览代码

fix: include typescript declarations in plugin template (#2674)

Jonas Kruckenberg 3 年之前
父节点
当前提交
c8262b736f

+ 5 - 0
.changes/cli.rs-plugin-template-include-types.md

@@ -0,0 +1,5 @@
+---
+"cli.rs": patch
+---
+
+Adds `types` field to the template package.json, so that generated typescript declarations get picked up correctly.

+ 1 - 0
tooling/cli.rs/templates/plugin/with-api/package.json

@@ -7,6 +7,7 @@
   "description": "",
   "browser": "webview-dist/index.js",
   "main": "webview-dist/index.js",
+  "types": "webview-dist/index.d.ts",
   "scripts": {
     "build": "rollup -c ./webview-src/rollup.config.js",
     "prepublishOnly": "yarn build",