vue-rx icon indicating copy to clipboard operation
vue-rx copied to clipboard

How to solve vue-rx incompatiblity with Vue3

Open kormosp opened this issue 1 year ago • 0 comments

Hi!

No matter how I try, I cannot import vue-rx into my spring boot admin (vue3) application that was just migrated from vue2. "vue": "^3.4.19", "rxjs": "^6.6.7", "vue-rx": "^6.2.0", "vuex": "^4.1.0"

"devDependencies": { "@vitejs/plugin-vue": "^5.0.4", "@vue-macros/reactivity-transform": "^0.4.3", "@vue/compiler-sfc": "^3.4.19", "vite": "5.1.1", "vite-plugin-static-copy": "^1.0.1" },

import { createApp } from 'vue';
import Vue from 'vue';
import custom from "./custom.vue";
import VueRx from 'vue-rx';

const app = createApp(custom);
app.use(VueRx);
app.mount('#app')

It always throws the error of:

vue-rx.esm.js:310 Uncaught TypeError: Vue.use is not a function
    at vue-rx.esm.js:310:7
    at custom-ui.js:2:241
    at custom-ui.js:3:3

Can you please help me out?

kormosp avatar Feb 20 '24 10:02 kormosp