Search code examples
vuepress

Vuepress: How can I switch config.js depending deploy target?


How can I switch config.js depending on the target? For example, in case deploy to localhost, I'd set dest: parameter in config.js as public:

dest: 'public/docs'

or, as dist for netlify

dest: 'dist/docs'

Solution

  • I've found solution with vuepress 1.x as --dest option, like as follows:

    vuepress build --dest dist/docs docs
    

    The docs is created on dist folder even config.js specifies as dest: 'public/docs',