Reputation: 303
Is there a way to remove plugins and its configuration with vue-cli3 in an existing project? For example I want to replace unit test plugin Mocha with Jest. I know how to add and invoke a new plugin but I cannot find how to remove one. Is it possible with vue-cli or do I need to do it manually?
Upvotes: 20
Views: 44030
Reputation: 65
You have to do it manually. It worked for me.
In my case, I just removed the plugin ("vue-cli-plugin-quasar": "^2.0.1",)
from devDependencies
in package.json
and ran npm install
.
Upvotes: 1
Reputation: 14294
Delete the vuetify stuff[1] from your package.json and then run:
npm prune
[1] Dependency vuetify
and dev dependencies vue-cli-plugin-vuetify
, vuetify-loader
...
Upvotes: 4
Reputation: 2298
I've asked about this (How does one uninstall a plugin? #2540) and it appears the current official advice is to issue an npm uninstall X
.
Upvotes: 20
Reputation: 137
With the new "vue ui" option, removing installed cli-plugins is supported now.
Under "Dependencies" (second tab on the left of vue ui) you'll find all plugins listed. And on the right of each plugin there is a little trash icon, which removes the respective plugin.
You still might get compile errors due to dead references in your sources, but those can be identified quickly with the provided log and error messages.
Upvotes: -3
Reputation: 1916
It looks like you need to do it manually, I cannot find anything in the docs or CLI help that mentions removal of plugins. It is slightly more complicated than @alexandre-canijo says though. Besides the package.json there may be some config in your project folder. Check the src/plugins folder, and main.js.
Upvotes: 3
Reputation: 299
I think you can just go to your package.json and remove the entry for the plugin/package,
delete the directory of your node_modules,
and then run.
npm install
Upvotes: 4