Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 960400b

Browse filesBrowse files
committed
chore: merge branch 'master' into dev
2 parents 0051017 + d41f31c commit 960400b
Copy full SHA for 960400b

File tree

Expand file treeCollapse file tree

3 files changed

+14
-8
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+14
-8
lines changed

‎docs/dev-guide/plugin-dev.md

Copy file name to clipboardExpand all lines: docs/dev-guide/plugin-dev.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ First, we need to read main file content with Node `fs` module (which provides a
251251
module.exports.hooks = (api) => {
252252
api.afterInvoke(() => {
253253
const fs = require('fs')
254-
const contentMain = fs.readFileSync(api.entryFile, { encoding: 'utf-8' })
254+
const contentMain = fs.readFileSync(api.resolve(api.entryFile), { encoding: 'utf-8' })
255255
const lines = contentMain.split(/\r?\n/g)
256256
})
257257
}
@@ -265,7 +265,7 @@ Then we should to find the string containing `render` word (it's usually a part
265265
module.exports.hooks = (api) => {
266266
api.afterInvoke(() => {
267267
const fs = require('fs')
268-
const contentMain = fs.readFileSync(api.entryFile, { encoding: 'utf-8' })
268+
const contentMain = fs.readFileSync(api.resolve(api.entryFile), { encoding: 'utf-8' })
269269
const lines = contentMain.split(/\r?\n/g)
270270
271271
const renderIndex = lines.findIndex(line => line.match(/render/))
@@ -283,7 +283,7 @@ module.exports.hooks = (api) => {
283283
api.afterInvoke(() => {
284284
const { EOL } = require('os')
285285
const fs = require('fs')
286-
const contentMain = fs.readFileSync(api.entryFile, { encoding: 'utf-8' })
286+
const contentMain = fs.readFileSync(api.resolve(api.entryFile), { encoding: 'utf-8' })
287287
const lines = contentMain.split(/\r?\n/g)
288288
289289
const renderIndex = lines.findIndex(line => line.match(/render/))

‎docs/guide/mode-and-env.md

Copy file name to clipboardExpand all lines: docs/guide/mode-and-env.md
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,16 @@ An env file simply contains key=value pairs of environment variables:
4343

4444
```
4545
FOO=bar
46-
VUE_APP_SECRET=secret
46+
VUE_APP_NOT_SECRET_CODE=some_value
4747
```
4848

49-
Note that only variables that start with `VUE_APP_` will be statically embedded into the client bundle with `webpack.DefinePlugin`.
49+
::: warning
50+
Do not store any secrets (such as private API keys) in your app!
51+
52+
Environment variables are embedded into the build, meaning anyone can view them by inspecting your app's files.
53+
:::
54+
55+
Note that only `NODE_ENV`, `BASE_URL`, and variables that start with `VUE_APP_` will be statically embedded into the *client bundle* with `webpack.DefinePlugin`. It is to avoid accidentally exposing a private key on the machine that could have the same name.
5056

5157
For more detailed env parsing rules, please refer to [the documentation of `dotenv`](https://github.com/motdotla/dotenv#rules). We also use [dotenv-expand](https://github.com/motdotla/dotenv-expand) for variable expansion (available in Vue CLI 3.5+).
5258

@@ -87,10 +93,10 @@ In both cases, the app is built as a production app because of the `NODE_ENV`, b
8793
You can access env variables in your application code:
8894

8995
``` js
90-
console.log(process.env.VUE_APP_SECRET)
96+
console.log(process.env.VUE_APP_NOT_SECRET_CODE)
9197
```
9298

93-
During build, `process.env.VUE_APP_SECRET` will be replaced by the corresponding value. In the case of `VUE_APP_SECRET=secret`, it will be replaced by `"secret"`.
99+
During build, `process.env.VUE_APP_NOT_SECRET_CODE` will be replaced by the corresponding value. In the case of `VUE_APP_NOT_SECRET_CODE=some_value`, it will be replaced by `"some_value"`.
94100

95101
In addition to `VUE_APP_*` variables, there are also two special variables that will always be available in your app code:
96102

‎packages/@vue/cli-plugin-eslint/README.md

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-eslint/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
--max-warnings specify number of warnings to make build failed (default: Infinity)
1818
```
1919

20-
Lints and fixes files. If no specific files are given, it lints all files in `src` and `test`.
20+
Lints and fixes files. If no specific files are given, it lints all files in `src` and `tests`.
2121

2222
Other [ESLint CLI options](https://eslint.org/docs/user-guide/command-line-interface#options) are also supported.
2323

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.