Vue Cli 3.0 配置文件在哪里? [英] Vue Cli 3.0 where is the config file?

查看:79
本文介绍了Vue Cli 3.0 配置文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文档等 vue.config.js 文件中看到过它.并且之前也注意到这些是在 webpack 配置文件等中处理的 2.0.但是我在使用 vue cli 3.0 创建的项目文件夹中找不到任何一个文件...配置文件在哪里,为什么它不在顶级文件夹等中的任何位置?

解决方案

配置文件在哪里,为什么它不在顶级文件夹等中的任何位置?

初始项目不需要文件存在,因为您刚刚使用不需要任何配置的全新默认"设置创建了一个项目.

自己创建即可.它甚至在 README 中提到:><块引用>

Vue CLI 项目的许多方面都可以通过在项目的根目录放置 vue.config.js 文件来配置.该文件可能已经存在,具体取决于您在创建项目时选择的功能.

(强调我的)

现在可以在这里找到:https://cli.vuejs.org/config/#global-cli-config

I've seen it mentioned in docs, etc the vue.config.js file. And also noted previously these are handled in the webpack config file, etc in 2.0. But I can't find either file in my project folder created with vue cli 3.0... Where is the config files and why isn't it anywhere in the top level folders, etc?

解决方案

Where is the config files and why isn't it anywhere in the top level folders, etc?

The initial project doesn't require the file to exist because you just created a project with fresh "default" settings that don't require any config.

Just create it yourself. it's even mentioned in the README:

Many aspects of a Vue CLI project can be configured by placing a vue.config.js file at the root of your project. The file may already exist depending on the features you selected when creating the project.

(emphasis mine)

Edit: now to be found here: https://cli.vuejs.org/config/#global-cli-config

这篇关于Vue Cli 3.0 配置文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆