Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is "vue.config.js" file?

I've just started to learn Vue but I simply can't set up enviroment for my container. I use Cloud9 and I have to assign my host for serving Vue app according to this link.

Unfortunately, I can't find vue.config.js file to do this.

Also there is no path indication in Vue docs.

"if it's present in your project root..." but what if not? Whatever, go use React? :)

Vue version: 3.1.1

like image 639
mr.boris Avatar asked Nov 07 '18 12:11

mr.boris


People also ask

What is the main js file in vue?

main. js contains the JavaScript to initialise a Vue app. App. vue contains the root component of a Vue app.

Where is webpack config js vue?

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.

What is Babel config js in vue?

config. js configures Vue. These are two different things. Babel transforms newer Javascript into old Javascript so that older browsers (notably IE11) can understand it. Vue uses Javascript to render DOM nodes.

Where is 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. You can run scripts with additional features using the GUI with the vue ui command.


1 Answers

See the documentation of Vue CLI:

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...
}

So just create the file by yourself. It is completely optional.

like image 118
str Avatar answered Oct 14 '22 03:10

str