-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Multiple values for "base" configuration #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can just set the base value depending on an environment variable: module.exports = {
base: process.env.VUEPRESS_BASE || '/'
} |
hi , I have met a question. in confg.js i setmodule.exports = {
base: process.env.NODE_ENV === 'development' ? '/magic-wpress/' : '/',
} why it don't work ? |
@RVYA Did you ever figure out how to set multiple values in |
Excuse me, my question is that I want to use the same code to automatically deploy on I searched how to set environment variable in package.json, but how to dynamic set it? Could you tell me more specificlly? |
You can use npm i -D cross-env in your package.json in config.js |
Feature request
I need to have the ability to set different values of base for deployment to multiple sites. My default deployment for the site is OK with the default, unspecified value for
base
because the content is deployed to https://www.wujiquan.netI also want to have a development deployment to https://hanxue.github.io/wujiquan-vuepress/ , to the
gh-pages
branch. Without settingbase
towujiquan-vuepress
, the Github Pages site will not workWhat problem does this feature solve?
Allowing multiple deployments with differing settings of base.
Is there any option to set configuration values via environment variables, or to specify a different configuration file other than the default
config.js
?The text was updated successfully, but these errors were encountered: