@o3o/vue-cli-plugin-env-yaml
v1.0.0
Published
vue-cli 3 plugin
Downloads
4
Readme
vue-cli-plugin-env-yaml
This is a vue-cli 3.x plugin to inject environment variables.
Environment variables injection
env.yaml:
baseURL:
DEV: dev.org
QA: qa.org
PRD: prd.orgnpm run build
console.log(baseURL)
// => dev.orgnpm run build:qa
console.log(baseURL)
// => qa.orgnpm run build:prd
console.log(baseURL)
// => prd.orgGetting started
:warning: Make sure you have vue-cli 3.x.x:
vue --versionIf you don't have a project created with vue-cli 3.x yet:
vue create my-new-appNavigate to the newly created project folder and add the cli plugin:
cd my-new-app
vue add @o3o/env-yamlStart your app:
npm run serve