From 9292b11f20ed51242812549f25db0bcd8f5fe4ba Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 28 Dec 2023 13:00:12 +0800 Subject: [PATCH] build(vuepress): remove client package from peer dependencies --- packages/bundler-vite/src/plugins/vuepressMainPlugin.ts | 2 +- packages/client/package.json | 5 ++++- packages/vuepress/package.json | 4 +++- packages/vuepress/src/client-app.ts | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 packages/vuepress/src/client-app.ts diff --git a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts index db0e5e7a4b..0ef95ed019 100644 --- a/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts +++ b/packages/bundler-vite/src/plugins/vuepressMainPlugin.ts @@ -32,7 +32,7 @@ export const vuepressMainPlugin = ({ /<\/body>/, `\ `, ), diff --git a/packages/client/package.json b/packages/client/package.json index 0efdf396e8..185a09c9ab 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -48,7 +48,10 @@ }, "tsup": { "clean": true, - "dts": "./src/index.ts", + "dts": [ + "./src/app.ts", + "./src/index.ts" + ], "entry": [ "./src/app.ts", "./src/index.ts" diff --git a/packages/vuepress/package.json b/packages/vuepress/package.json index 8f1ed9e6a9..e1f26f8174 100644 --- a/packages/vuepress/package.json +++ b/packages/vuepress/package.json @@ -24,6 +24,7 @@ "./bin": "./bin/vuepress.js", "./cli": "./dist/cli.js", "./client": "./dist/client.js", + "./client-app": "./dist/client-app.js", "./core": "./dist/core.js", "./markdown": "./dist/markdown.js", "./shared": "./dist/shared.js", @@ -57,7 +58,6 @@ "peerDependencies": { "@vuepress/bundler-vite": "workspace:*", "@vuepress/bundler-webpack": "workspace:*", - "@vuepress/client": "workspace:*", "vue": "^3.3.13" }, "peerDependenciesMeta": { @@ -76,6 +76,7 @@ "dts": [ "./src/index.ts", "./src/cli.ts", + "./src/client-app.ts", "./src/client.ts", "./src/core.ts", "./src/markdown.ts", @@ -85,6 +86,7 @@ "entry": [ "./src/index.ts", "./src/cli.ts", + "./src/client-app.ts", "./src/client.ts", "./src/core.ts", "./src/markdown.ts", diff --git a/packages/vuepress/src/client-app.ts b/packages/vuepress/src/client-app.ts new file mode 100644 index 0000000000..4f5c20e182 --- /dev/null +++ b/packages/vuepress/src/client-app.ts @@ -0,0 +1 @@ +export * from '@vuepress/client/app'