vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.48k stars 1.86k forks source link

Reuse some of the existing methods in `@vue/shared` #3720

Closed wangyewei closed 1 month ago

wangyewei commented 1 month ago

I noticed that VitePress imports @vue/shared, but it appears to only use one of its methods. However, there are more methods available in @vue/shared. Should VitePress directly import these additional methods from @vue/shared to reduce redundancy in the code?

Here is one case of what I mentioned:

vitepress: https://github.com/vuejs/vitepress/blob/a6a7645e942cc63c57ca5d79da4b76dee76d8a96/src/node/config.ts#L229

@vue/shared: https://github.com/vuejs/core/blob/db374e54c9f5e07324728b85c74eca84e28dd352/packages/shared/src/general.ts#L52

Seems that can directly use import { isObject } from '@vue/shared.

brc-dd commented 1 month ago

Wouldn't make much impact. Those are one-liners mostly.