From 777ff34ab35f359893bcfac26c6e1baecceed3a1 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Wed, 24 Nov 2021 17:19:51 +0100 Subject: [PATCH] [fix] add types properly in exports in package.json Fixes #2863 Also removes somewhat weird types export "./types" which is redundant: you get these through the default import, too. --- .changeset/beige-eyes-poke.md | 5 +++++ packages/kit/package.json | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/beige-eyes-poke.md diff --git a/.changeset/beige-eyes-poke.md b/.changeset/beige-eyes-poke.md new file mode 100644 index 000000000000..2753ff24b56f --- /dev/null +++ b/.changeset/beige-eyes-poke.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +Fix types reference in exports in package.json diff --git a/packages/kit/package.json b/packages/kit/package.json index de0b279d38f2..458d0691192e 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -68,6 +68,9 @@ }, "exports": { "./package.json": "./package.json", + ".": { + "types": "./types/index.d.ts" + }, "./ssr": { "import": "./dist/ssr.js" }, @@ -79,8 +82,7 @@ }, "./install-fetch": { "import": "./dist/install-fetch.js" - }, - "./types": "./types/index.d.ts" + } }, "types": "types/index.d.ts", "engines": {