Read sourceDir during config stage #650
-
Hi, does anyone know how to read the ${sourceDir} during the configuration stage? I'm basically trying to setup my own implementation of vuepress-bar that generates side / top navigation menus automatically in code Since this isn't a plugin but runs during the configuration stage, I'm wondering on the best way to do this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can try to invoke it in vuepress config file. import { defineUserConfig} from '@vuepress/cli';
import { helper } from 'your-plugin'
const config = defineUserConfig({
// ...
});
// do somthing with helper using the config
helper(config)
return config; And I am assuming you know how to infer source Dir from args and pwd. |
Beta Was this translation helpful? Give feedback.
You can try to invoke it in vuepress config file.
And I am assuming you know how to infer source Dir from args and pwd.