Questions tagged [vue-cli]

Vue CLI is the official tooling for bootstrapping and maintaining your Vue projects. Offering a feature rich and extensible platform for using (or developing your own) plugins and preset in zero-configuration fashion, as well as future-proofing the upgradebility of your project and tooling configurations.

Vue CLI, created and maintained by the Vue's core team, is the official tooling for bootstrapping and maintaining your Vue projects.

Offering a feature rich and extensible platform for using (or developing your own) plugins and preset in zero-configuration and easily configurable fashion, as well as future-proofing the upgradability of your project and tooling configurations.

Vue CLI ecosystem currently offers these Core Plugins:

  • @vue/cli-plugin-babel
  • @vue/cli-plugin-typescript
  • @vue/cli-plugin-eslint
  • @vue/cli-plugin-pwa
  • @vue/cli-plugin-unit-jest
  • @vue/cli-plugin-unit-mocha
  • @vue/cli-plugin-e2e-cypress
  • @vue/cli-plugin-e2e-nightwatch

There's a community site Awesome Vue CLI packages for browsing all the plugins and presets available.

1633 questions
239
votes
15 answers

What is the difference between the views and components folders in a Vue project?

I just used the command line (CLI) to initialize a Vue.js project. The CLI created a src/components and src/views folder. It has been a few months since I have worked with a Vue project and the folder structure seems new to me. What is the…
drsnark
  • 2,813
  • 2
  • 15
  • 19
215
votes
21 answers

How to change port number in vue-cli project

How to change Port number in Vue-cli project so that it run's on another port instead of 8080.
salman
  • 2,287
  • 3
  • 11
  • 11
213
votes
4 answers

Vue 'export default' vs 'new Vue'

I just installed Vue and have been following some tutorials to create a project using the vue-cli webpack template. When it creates the component, I notice it binds our data inside of the following: export default { name: 'app', data:…
rockzombie2
  • 2,835
  • 4
  • 16
  • 20
202
votes
14 answers

Using Environment Variables with Vue.js

I've been reading the official docs and I'm unable to find anything on environment variables. Apparently there are some community projects that support environment variables but this might be overkill for me. So I was wondering if there's something…
Edgar Quintero
  • 4,223
  • 2
  • 34
  • 37
183
votes
3 answers

Vue CLI CSS pre-processor option: dart-sass VS node-sass?

When creating a new project with CLI (v3.7.0), there is an option to choose between dart-sass or node-sass compiler. How do these compare to each other, to be more specific than declared in Vue docs? A Tip on Sass Performance Note that when using…
ux.engineer
  • 10,082
  • 13
  • 67
  • 112
179
votes
7 answers

How do I use /deep/ or >>> or ::v-deep in Vue.js?

So, I've read here that in Vue.js, you can use /deep/ or >>> in a selector in order to create style rules that apply to elements inside of child components. However, attempting to use this in my styles, whether in SCSS or in plain old CSS, doesn't…
laptou
  • 6,389
  • 2
  • 28
  • 59
161
votes
19 answers

Which command do I use to generate the build of a Vue app?

What should I do after developing a Vue app with vue-cli? In Angular there was some command that bundle all the scripts into one single script. Is there something the same in Vue?
artem0071
  • 2,369
  • 3
  • 14
  • 25
118
votes
22 answers

How to disable ESLint in vue-cli?

How do I go about disabling ESlint in project generated with vue-cli? preLoaders: [ { test: /\.vue$/, loader: 'eslint', include: projectRoot, exclude: /node_modules/ }, { test: /\.js$/, loader: 'eslint', include:…
Mahmud Adam
  • 3,489
  • 8
  • 33
  • 54
82
votes
7 answers

vue cli 3 – use background image in style tag

I want to use a svg image from my assets folder in one of my components as a background-image. Here is an example of my component: