vuepress-shared
Some powerful utils for VuePress2
Install
pnpm
pnpm add -D vuepress-shared
yarn
yarn add -D vuepress-shared
npm
npm i -D vuepress-shared
Usage
Warning
VuePress is running on both Node.js Side and Browser Side, we called it node
and client
.
So you should be aware to import the correct file, as Node.js has built-in modules and has ability to access file system, and browser has global variables like window
or navigator
.
- At Node Side, you should import functions from
vuepress-shared/node
. - At Client Side, you should import functions from
vuepress-shared/client
.