vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 922 forks source link

feat(client): add VPLink #1435

Closed Mister-Hope closed 7 months ago

Mister-Hope commented 7 months ago

This avoids resolving page data of the destination path with <router-link>

Also the built-in resolve in @vuepress/client has higher performance than router.resolve

Note: For performance consideration, <VPLink /> does not have a built-in active state. You should handle this yourself while using it.

This PR is based on the new router built, and replace #1353

Mister-Hope commented 7 months ago

Ci result while finishing official docs page-render stage:

Before(main): 2.5-3.9s After: 1.4-2.8s

Local test result with a 1 million words project https://innenu.com:

Before(main): 186.22s After: 108.11s