From 1cc087deeee5f6c8289259bb7a2695ed75f287c3 Mon Sep 17 00:00:00 2001 From: JounQin Date: Tue, 2 Aug 2022 15:17:13 +0800 Subject: [PATCH] fix(types): add client and theme to `exports` field (#914) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- client.d.ts | 2 ++ package.json | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client.d.ts b/client.d.ts index f206e730..7cfa18ff 100644 --- a/client.d.ts +++ b/client.d.ts @@ -1,3 +1,5 @@ // re-export vite client types. with strict installers like pnpm, user won't // be able to reference vite/client in project root. /// + +export * from './dist/client' diff --git a/package.json b/package.json index a9d033fa..18d60157 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,15 @@ "import": "./dist/node/index.js", "require": "./dist/node-cjs/index.cjs" }, - "./dist/client/*": "./dist/client/*" + "./dist/client/*": "./dist/client/*", + "./client": { + "types": "./client.d.ts", + "default": "./dist/client/index.js" + }, + "./theme": { + "types": "./theme.d.ts", + "default": "./dist/client/theme-default/index.js" + } }, "bin": { "vitepress": "bin/vitepress.js"