Browser by pressing F12
and then turn on the console, click Source
, click webpack://
, click on the appropriate vue 文件
, even found the vue
code turned out to be completely displayed, ah this. . . . Okay, it's a bit tricky, and it's not mentioned in the official document (maybe I am too dishonest).
In fact, this is for the convenience of front-end programmer in a formal environment for debugging, 默认是开启的
in vue
learning the official website did not introduce too much, because the use is vue-cli
to package, so vue-cli
there is a document presentation, specific view https: //cli.vuejs. org/zh/config/#productionsourcemap
There are two solutions:
- Method One: If you have a project
vue.config.js
file, you can configure the file, if not the venue and method II.
module.exports = {
...
productionSourceMap: false // false 表示关闭
...
}
- Method 2:
package.json
increase invue
property, configured in there, it must comply withJSON
the syntax
[Note] in vue-cli 3.0
after vue.config.js
it becomes an optional configuration file, the default is not, but then, we can package.json
be configured, the configuration is as follows:
{
...
"dependencies": {
...
},
"vue": {
"productionSourceMap": false // false 表示关闭
},
...
}
I really need to check more documents in the future: vue-cli configuration document
Personal blog: Roc's Blog