0

Right now vue3 is in beta and I want to try it.

Is there a way using @vue/cli to install the vue3 beta? if so, How?

1

1 Answer 1

1

You need the latest version of @vue/cli and then run vue add vue-next in an existing Vue CLI project.

This will:

  • Add Vue 3 and the new Vue 3 Compiler to your project
  • Configure webpack to use the new vue compiler
  • Install Vuex 4 and vue-router 4 beta (or alpha dunno where they are rn) if the older versions are in your project
  • Codemods for compatibility

More Info here

However, not every package that works with Vue2 will work with this Vue3. If all you want to try out is the new composition-api, there is a plugin which you can add which is still using Vue2 but with many of the composition-apis Features, probably all non-breaking changes? You install that by either running

npm install @vue/composition-api

or

yarn add @vue/composition-api

and then install it like this before using other APIs:


import Vue from 'vue';
import VueCompositionApi from '@vue/composition-api';

Vue.use(VueCompositionApi);
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.