question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow router/vuex to be late-added

See original GitHub issue

Version

3.0.0-beta.6

Reproduction link

CLI issue, no code necessary

Steps to reproduce

  1. Install vue cli 3 beta 6
  2. vue create my-project 2a. Do NOT install router
  3. vue add @vue/router

What is expected?

That it will add the router configuration/dependencies that would have been added if I selected the router from the initial install.

What is actually happening?

No vue router plugin is found so the vue add @vue/router command fails.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
yyx990803commented, May 1, 2018

The logic for adding vuex/router is already contained in vue-cli-service, so we don’t need to (and shouldn’t) make them separate packages. Maybe they can be extracted into internal plugins that can be “added virtually” added when you run vue add router

3reactions
dhenschecommented, May 1, 2018

That is not the case right now. The vuex and vue-router features would have to be re-written as plugins. Currently they are installed and the files generated as part of the cli-service depending on the selected features when creating a new project, not as separate plugins

see https://github.com/vuejs/vue-cli/blob/69a6b0bbfe9f844d4101a77f5edf5b8236970b2d/packages/%40vue/cli-service/generator/index.js#L33 for adding the dependency to the package.json or https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/generator/template/src/router.js for one the related generated files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wait for VueX value to load, before loading component
One way to do it is to store state values. For example, if your store relies on single API, you would do something...
Read more >
How to Use Vuex and Vue-Router in a Vue.JS Project
Tutorial using Authentication and Authorization and making use of Json Web Tokens with Vue.JS.
Read more >
Handling authentication in Vue.js using Vuex, Vue Router ...
I'll explain why we're sending the user to the authfinalize route later in the article. Allowed logout URLs. These are the URLs that...
Read more >
How To Manage State in a Vue.js Application with Vuex
vue component, the wrapper <div> contains the class of airport . This CSS adds some styling to the generated HTML by adding borders...
Read more >
Vue Js in-depth (Components, Vuex, Vue Router) - YouTube
In this video, you will learn one of Vue Js' features and two of its plug-ins.Timestamps:00:00 - Intro00:42 - Components05:19 - Vuex13:37 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found