1

I installed Vue.js with the command line:

bundle exec rails webpacker:install:vue

How can revert it and uninstall Vue.js?

1 Answer 1

4

webpacker v5 currently doesn't have uninstall support, so you'd have to manually undo the install:vue command's actions:

  1. Remove vue loader from config/webpack/loaders: Delete <rootDir>/config/webpack/loaders/vue.js

  2. Remove vue loader: In <rootDir>/config/webpack/environment.js:

    a. delete const { VueLoaderPlugin } = require('vue-loader')

    b. delete environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())

    c. delete const vue = require('./loaders/vue')

    d. delete environment.loaders.prepend('vue', vue)

  3. Remove .vue file extension support from Webpack config: In the Webpacker config file, delete - .vue

  4. Remove example entry file: Delete <srcDir>/hello_vue.js

  5. Remove Vue app file: Delete <srcDir>/app.vue

  6. Uninstall Vue dependencies: From <rootDir>, run yarn remove vue vue-loader vue-template-compiler

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.