https://github.com/aircity/vue-cli-plugin-envdotyaml
https://github.com/aircity/vue-cli-plugin-envdotyaml
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aircity/vue-cli-plugin-envdotyaml
- Owner: Aircity
- Created: 2019-03-24T07:20:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-24T09:18:55.000Z (about 7 years ago)
- Last Synced: 2025-05-19T16:14:40.279Z (about 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-cli-plugin-env-yaml
This is a vue-cli 3.x plugin to inject environment variables.
## Environment variables injection
env.yaml:
```
baseURL: http://example.com/
```
npm run build
```
console.log(process.env.baseURL)
// => http://example.com/
```
## Getting started
:warning: Make sure you have vue-cli 3.x.x:
```
vue --version
```
If you don't have a project created with vue-cli 3.x yet:
```
vue create my-new-app
```
Navigate to the newly created project folder and add the cli plugin:
```
cd my-new-app
vue add envdotyaml
```
Start your app:
```
npm run serve
```