.babelrc
r:runtime
c:control
vue.config.js 配置
摘自:https://www.jianshu.com/p/b358a91bdf2d
vue-config-js配置参考
vue-cli3 脚手架搭建完成后,项目目录中没有 vue.config.js 文件,需要手动创建
创建vue.config.js
vue.config.js 是一个可选的配置文件,如果项目的 (和 package.json 同级的) 根目录中存在这个文件,那么它会被 @vue/cli-service 自动加载。你也可以使用 package.json 中的 vue 字段,但是注意这种写法需要你严格遵照 JSON 的格式来写。
以下摘自官网:https://github.com/vuejs/vue-cli/tree/dev/docs/config#vueconfigjs
vue.config.js
vue.config.js
is an optional config file that will be automatically loaded by @vue/cli-service
if it's present in your project root (next to package.json
). You can also use the vue
field in package.json
, but do note in that case you will be limited to JSON-compatible values only.
The file should export an object containing options:
// vue.config.js
module.exports = {
// options...
}
在根目录中创建 vue.config.js
vue.config.js配置
这个文件应该导出一个包含了选项的对象:
配置选项