pagekit / vue-resource

The HTTP client for Vue.js
MIT License
10.08k stars 1.6k forks source link

Any plans for Vue 3 support? #762

Open xrado opened 2 years ago

xrado commented 2 years ago

Look there are only changes in the src/index.js needed (install)

mokkabonna commented 2 years ago

@janschoenherr Are you willing to add or accept help with vue 3 support? Seems not to hard.

mushfiqur-rahman commented 2 years ago

My Main.js in vue 3

`import { createApp } from 'vue' import App from './App.vue' import router from './router' import store from './store' import VueResource from 'vue-resource'

Vue.use(VueResource);

Vue.http.options.root = 'http://127.0.0.1:8000/api/';

createApp(App).use(store).use(router).mount('#app')`

After configuring in Vue js 3 I got this error.

`D:\PROJECT\vueJS\v3-frontend\src\main.js 7:1 error 'Vue' is not defined no-undef 9:1 error 'Vue' is not defined no-undef

✖ 2 problems (2 errors, 0 warnings)

webpack compiled with 1 error`

But in Vue js 2 this code working perfectly

21071988 commented 2 years ago

Vue.use construction and using Vue from import Vue from 'vue' does not work in Vue 3