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?
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.
The webpack-simple template has the webpack-config. js file directly in root of your project folder. Looks like you are using webpack template. To make changes to the webpack config goto the build folder.
Inside a Vue CLI project, @vue/cli-service installs a binary named vue-cli-service . You can access the binary directly as vue-cli-service in npm scripts, or as ./node_modules/. bin/vue-cli-service from the terminal.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With