Questions tagged [vue-cli-4]

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. Use this tag for questions specific to version 4.

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

Use this tag for questions specific to version 4.

112 questions
2
votes
0 answers

Preserve upload folder during Vue build

I have an image gallery application: the frontend (Vue 2.6) will allow users to upload images along with some basic information the backend (NodeJs) will create thumb images and will store them along with the original ones in an upload folder I…
Valentin Vucea
  • 119
  • 2
  • 11
2
votes
0 answers

Vue-CLI: Remove '.umd' from filename in dist folder

I'm generating a library with Vue CLI 4.4: vue-cli-service build --target lib --formats=umd,umd-min --name example main.js As a result, I get a number of files in the dist folder: example.umd.js example.umd.min.js ... I'd like to remove the .umd…
M. Mohr
  • 41
  • 2
2
votes
1 answer

Does Vue Cli 4.4.6 scaffold ES2020 into the project

If I run vue create my-new-app using the latest Vue Cli (currently version 4.4.6) will all the new ES2020 features be implemented? (I've tested "optional chaining" and seem to be able to use that) If so, how can I tell from the scaffolded code? I'm…
2
votes
0 answers

vue-cli project compiles but "vue.version is undefined" error prevents opening in browser

I'm working on a project I set up with vue-cli (originally vue-cli-3 but I guess I just updated to vue-cli-4 while trying to fix this problem). It was working fine, but suddenly stopped opening in Firefox and Safari. "npm run serve" compiles…
eveames
  • 201
  • 1
  • 2
  • 6
2
votes
0 answers

Vue.js component library that depends on Vuetify. $attrs is readonly - error

Intro: I've generated two projects with vue-cli ~4.2.0: parent-app - main project dummylib - library which is imported by parent-app. Has a bunch of .vue components inside. I want to use vuetify here Example of library component, where i utilize…
KrasnokutskiyEA
  • 587
  • 1
  • 6
  • 20
2
votes
1 answer

Vue gives me a warning about uncommited changes

so I just created a new vue project with vuecli. I played around a bit and then wanted to add a new plugin using vue add . Now I get the following warning: There are uncommited changes in the current repository, it's recommended to commit…
xotix
  • 494
  • 1
  • 13
  • 41
2
votes
0 answers

Eslint detects formatting errors, but does not fix them at save (Vue/cli 4.2) despite 'lintOnSave: true'

I have recently created a project with Vue/cli 4.2. The problem is that Eslint detects formatting errors (eg. double quotation marks in script, no space between function parentheses), but does not fix them at save despite explicit lintOnSave: true…
Eggon
  • 2,032
  • 2
  • 19
  • 38
2
votes
0 answers

vue cli import scss from node_modules with alias

How i can resolve nested imports inside node_modules package with aliases? I have an npm package. And in my vue cli project i have import from npm package: @import ~npmPackage/src/theme.scss. But theme.scss use another import inside: @import…
Alex Pan
  • 21
  • 2
2
votes
1 answer

vue-cli-service build fails with 0 errors

Is there a way to track down this kind of build problem? I.e. a flag that would show more detailed error information? My project is very much like the default vue cli project. It has been working fine for months until this morning. $…
Steve
  • 883
  • 7
  • 23
1
vote
0 answers

Split Vue / webpack with single big bundle to chunks

My production build has a single 2 MB large js file. Lighthouse shows that a half of it was not used during a rendering. I would love to split it into smaller chunks. Versions: "@vue/cli-service": "^4.5.14", "peerDependencies": { "webpack":…
Leos Literak
  • 8,805
  • 19
  • 81
  • 156
1
vote
1 answer

How to update a dependency within a dependency?

I would like to update a 'handlebars' node module that is a dependency of Vue-Cli (see screenshot). What's the correct way to do this? Thank you
redshift
  • 4,815
  • 13
  • 75
  • 138
1
vote
0 answers

How to implement dynamic url for a multipage app using Vue-cli?

I'm building a multipage app using vue-cli. I want to implement a dynamic url like, example.com/user/user1 example.com/user/user2 example.com/user/user3 ... How to implement this in vue.config.js file? Currently, my vue.config.js file looks like…
John Paul
  • 75
  • 2
  • 8
1
vote
1 answer

How to secure API Keys in Environment Variables in a Vue CLI 4 and Electron project

I'm trying to develop a desktop app which would need to make a few private API calls, authenticated using some secret keys. The keys are created for me by external IT service providers outside of my organisation - they are responsible for the…
tam
  • 21
  • 5
1
vote
2 answers

Created a new vue project using vue/cli create but cannot serve

Last week I had nothing wrong on creating a new project and serving it, but today when I use vue/cli to create a new default project, I got a compile error when serving. PS E:\Projects\testing> yarn serve yarn run v1.22.5 $ vue-cli-service serve …
user3602859
  • 87
  • 1
  • 6
1
vote
0 answers

I cannot set up the autoprefixer in VueCLI with POSTCSS

I want set up autoprefixer plugin with postcss-loader. Because apparently vue-loader in version 15 does not activate the autoprefixer by default. I have tried several ways to do this, put the postcss configuration in a separate file, in the…