From c8262b736f978474454913aeb4ad69f476672be0 Mon Sep 17 00:00:00 2001 From: Jonas Kruckenberg Date: Tue, 28 Sep 2021 15:03:38 +0200 Subject: [PATCH] fix: include typescript declarations in plugin template (#2674) --- .changes/cli.rs-plugin-template-include-types.md | 5 +++++ tooling/cli.rs/templates/plugin/with-api/package.json | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changes/cli.rs-plugin-template-include-types.md diff --git a/.changes/cli.rs-plugin-template-include-types.md b/.changes/cli.rs-plugin-template-include-types.md new file mode 100644 index 000000000..aa9233462 --- /dev/null +++ b/.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. diff --git a/tooling/cli.rs/templates/plugin/with-api/package.json b/tooling/cli.rs/templates/plugin/with-api/package.json index 29a1db27b..485317f12 100644 --- a/tooling/cli.rs/templates/plugin/with-api/package.json +++ b/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",