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
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
29
votes
9 answers

Support optional chaining in vuejs

I have created vue and electron app using @vue/cli-service 4.2 in that I am facing a issue of optional chaining. I can't use ? for validating the condition like (@babel/plugin-proposal-optional-chaining) eg. a?.b?.c its means it check weather a…
Hardik Kothari
  • 1,686
  • 1
  • 15
  • 29
9
votes
2 answers

How can I activate the sourcemap for Vue-Cli 4?

I believed the npm run serve command use the sourcemap by default for the js, but it seems not because I always see vue.runtime.esm.js:619. I made a vue.config.js file at the root level project. I try two things: module.exports = { …
GBMan
  • 475
  • 2
  • 4
  • 16
8
votes
4 answers

How to fix @vue/cli Vulnerabilities?

I having vuejs-3 project and I am looking for 0 vulnerabilities. When I do npm install I am getting 48 vulnerabilities with current version node and npm. Even if I try npm audit fix --force still Issue is the same. Can someone help me…
Chalapathi
  • 81
  • 1
  • 3
7
votes
1 answer

How to disable minified in vue-cli?

I wanna the production code is not minified in dist/ with @vue/cli 4.1.2 1、first try set vue.config.js module.exports = { chainWebpack: config => { config.optimization.minimize(false) } } and then other parts is normal, but the inline script…
flyflydogdog
  • 307
  • 3
  • 10
6
votes
1 answer

Vue.js 3 SSR - missing template or render function during client hydration

I'm trying to create Vue.js 3 SSR app (including ts, @vue/cli, babel). I'm using nodejs + express as a backend. SSR is working fine (I'm getting properly rendered html from server), but error occurs during client side hydration. It seems like my…
6
votes
1 answer

How to customise names of the JS files produced by Vue CLI?

I can't find documentation on how to minimize assets and produce *.min.js files using vue cli. Im using vue cli version 4.2.3. I require the extention to be *.min.js for rollbar to function correctly. How would you go about configuring vue cli to…
larsrbak
  • 95
  • 1
  • 7
6
votes
1 answer

vue add i18n runs into error with vuejs3 and @vue/cli 4.5.4, what does the error mean and how to debug?

when I try to vue add i18n I am running in this error: Invoking generator for vue-cli-plugin-i18n... ERROR Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path…
helle
  • 11,183
  • 9
  • 56
  • 83
6
votes
1 answer

How disable link (async module) prefetch / preload by default with Vue CLI 4.3?

How disable rel="prefetch" in dynamic route import? I'm using @vue/cli 4.3.1 and Webpack 4.43.0, trying to disable prefetch: in route.js const Registration = () => import( /* webpackPrefetch: false */ /* webpackChunkName: "registration" */…
Siviy
  • 69
  • 1
  • 7
6
votes
2 answers

How can I copy a *.html file in /dist folder when using vue-cli-service build --target lib?

While I clearly am no webpack expert, I usually figure/find out what I need to modify in order to achieve what I need. However, I lost more than a day on this one, even though it seems fairly simple: I want to add an index.html to the build, after…
tao
  • 82,996
  • 16
  • 114
  • 150
6
votes
1 answer

Keeping asset and public path different in vue app for CDN

vue has this option publicPath which lets an app to be deployed on subpath: foobar.com/my-path , making links and every asset accessible via it. From performance standpoint, I want to enable CDN on my application's assets. How can I use the URL…
kiddorails
  • 12,961
  • 2
  • 32
  • 41
5
votes
1 answer

Debugging Vue 3 with Vue CLI V4

I'm using Vue 3 and I want to debug the standard Vue demo using VS Code (Chrome Extension Debugger). My vue.config.js looks like this: module.exports = { configureWebpack: { devtool: 'source-map' } } Here are my launch.json…
MASC
  • 51
  • 3
5
votes
1 answer

Vue CLI 4.5.*: "export 'default' (imported as 'Vue') was not found in 'vue'

While working with Vue CLI 4.5.x, I tried the following code: import Vue from "vue" import App from './App.vue' new Vue({ el: "#app", render: h=> h(App) }) But unfortunately, it gave the following warnings: "export 'default' (imported as…
Gursewak Singh
  • 642
  • 1
  • 7
  • 20
5
votes
1 answer

VueJS plugins conflict

I created two plugins in my VueJS app powered by Vue CLI 4 but when I tried to use it in my page only one will be working | plugins |-- axios.vue |-- authentication.vue axios.vue import Vue from "vue"; Plugin.install = function(Vue) { …
Dean Christian Armada
  • 6,724
  • 9
  • 67
  • 116
4
votes
3 answers

Personal Vue 3 component package missing template or render function

I recently uploaded my own Vue 3 component to NPM to make it usable for others. When using it in other projects it gives this warning: [Vue warn]: Component is missing template or render function. at at…
Niels Bosman
  • 826
  • 1
  • 8
  • 19
1
2 3 4 5 6 7 8