19 Commits

Author SHA1 Message Date
Haoqun Jiang e40f06212b docs: replace vuepress with vitepress (#6821) 2021-11-09 16:06:01 +08:00
JiZhi 6f3fc16431 docs: mode-and-env doc need be updated (#6050) 2020-12-17 16:11:24 +08:00
Haoqun Jiang d41f31c2f9 docs: add warning on client side environment variables (#5243)
Inspired by the create-react-app documentation
https://create-react-app.dev/docs/adding-custom-environment-variables
2020-03-07 00:22:35 +01:00
Mohsen Sadeghzade 8492055a7f Update mode-and-env.md (#4257)
* Update mode-and-env.md

Fixed example of keys, which they should start with VUE_APP_

* Update mode-and-env.md

change position of the tip

* Update docs/guide/mode-and-env.md

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>
(cherry picked from commit 149b307f72)
2019-07-30 00:21:15 +08:00
mx 45399b192a Explain when .env files are loaded. (#4171)
It appears that .env files are only loaded at the start of `vue-cli-service` and are not watched for hot reloads.
**I am actually not sure this is the case for everyone, but is so for me.**

I think it is worth noting because the expectation is that a file at the root of the project would be watched for hot reloads.

(cherry picked from commit b22bedbf94)
2019-07-18 16:58:40 +08:00
Min ho Kim c0aa2bb310 Fix typos (#4241) 2019-07-06 07:09:29 +03:00
Haoqun Jiang bd57f15a15 feat: support environment variable expansion (#3534) 2019-02-28 15:04:46 +08:00
Haoqun Jiang c078633be1 chore: merge branch 'dev' into docs 2019-02-20 16:54:46 +08:00
Haoqun Jiang 3195287d10 docs: revert misleading warnings on NODE_ENV 2019-02-18 22:01:53 +08:00
Haoqun Jiang 225b558935 refactor: use dotenv to parse env file and add a link to its docs (#3462) 2019-02-18 14:44:12 +08:00
Jost Schulte 85c31cf79c docs: extend mode and env vars guide (#2657) [ci skip] 2019-02-16 12:15:55 +08:00
Haoqun Jiang e7af0d8fa3 feat: deprecate confusing baseUrl option, use publicPath instead. (#3143)
* feat: deprecate confusing `baseUrl` option, use `publicPath` instead.

* fix: do not touch CHANGELOG.md

* docs: links referring baseUrl now changed to publicPath
2019-01-07 21:20:05 +08:00
Natalia Tepluhina 7d99c441b3 docs: add a code sample for computed env variables declaration (#3046) [ci skip]
Fixes #2864
2018-11-30 20:53:12 +08:00
Evan You fff62f7a73 refactor: enable dev config in more cases 2018-08-08 10:18:48 -04:00
Evan You 45cc5e94e9 docs: add tip about env loading priorities 2018-07-23 12:34:49 -04:00
Guillaume Chau 33b852f7a8 docs: fix tip [ci skip] 2018-07-12 00:36:17 +02:00
Ray Foss 62e2868007 docs: Include Tip about computed env vars (#1780)
* Include tip about computed env vars

I'm personally using this frivolously in my own footer
```
// vue.config.js
const revision = require('child_process').execSync('git rev-parse HEAD').toString().trim()
const pjson = require('./package.json')

process.env.VUE_APP_COMMIT = `"${revision}"`
process.env.VUE_APP_VERSION = `"${pjson.version}"`
module.exports = {}
```

```
<template>
  <footer>
      <span>v{{ version }} ({{ commit }})</span>
  </footer>
</template>

<script>
export default {
  data: function () {
    return {
      version: process.env.VUE_APP_VERSION,
      commit: process.env.VUE_APP_COMMIT
    }
  }
}
```

# Validation
 - I'm using this.
 - The inline require doesn't cause lint issues on vue-cli v3 config files. I did a full builds to check.

* tip format match

* tip format

* tip, format

* markdown formatting conflicts with es6 templates

Also, quotes, optional now. interesting. I tried it.

* remove template stray

* filenames are not proper english grammar, yet
2018-07-11 01:28:04 +02:00
Evan You fb97646ee5 docs: more content 2018-06-08 00:10:35 -04:00
Evan You 4e922055e4 docs: wip 2018-06-05 14:50:04 -04:00