-
Notifications
You must be signed in to change notification settings - Fork 157
Vue3 is not supported #890
Comments
I have made a couple of POCs on Vue 3, if you apply all the patches from https://github.com/algolia/vue-instantsearch/milestone/2 it will work on Vue 3, but only if you import the components directly (not from At the moment you're the first person which actually requested this, which is why we haven't yet seriously migrated. I want to make sure our library works with both versions of vue, but the migration guides on the vue site assume you only need to support vue 3, which I don't think will be the case for many people grandfathered on vue 2 |
Thank you. I'm asking the team to have a look. |
Actually I have the same problem. Will be good if you will have a support for VUE3 |
Does someone have an example of a different library which supports both Vue 2 & Vue 3? I haven't come across any yet (that have rendering). Have you tried the POC @mits87 ? |
@Haroenv most of the libraries doing a About POC - can you create a separate branch (eg. |
Hi @Haroenv, thank you for your feedback. I have forked this repo and applied all the POC changes mentioned, with all tests passing. However once I use this repo in my project, and switch to importing the components directly, I get the following error:
From the following snippet of code:
|
I didn't get that error when last trying @SteveLewisES, where can I try your version to debug? |
https://github.com/SteveLewisES/vue-instantsearch :) |
We will soon need support for Vue 3. |
It's a fair option, but that assumes that everyone will update to Vue 3 soon, otherwise we need to maintain Vue InstantSearch for version 3 and version 2, and won't be able to make any breaking changes in a v2 support. The other projects that I've seen to bet on Vue 3 already seem to be mostly stable (routing etc.) |
@Haroenv good point. Everyone will properly not update to Vue 3 before all the major libraries have a version that supports Vue 3 available. |
Any update/ETA on this? The core ecosystem for Vue3 is now out of beta and instantserach is currently for my project the only dependency that's not available. As @mathiasvalentin and @Haroenv mention, I think many projects will be on Vue 2 for a long time forward while others are already starting to upgrade. A solution for both camps would be ideal. |
We are also interested in using Vue3 with a project we're currently building. Like some others here, Algolia Instant Search is the only dependency which does not support it. Would be great to have some solution available for teams in our situation. |
As we will see more demand for vue 3 support, we're prioritizing the task. I cannot tell the ETA but we're already working on it a bit and more will come. |
Oh no Vue 3 has no support yet? |
Any word? |
As said, we are working on this, but it's definitely not straightforward. I still have not found a different package that supports vue 2 and vue 3, so this would be the first one (since having two separate branches is much more work for maintenance) |
|
Already proposed in #847 (comment), but working on a library to be compatible both with Vue 2 and 3 is definitly not so easy, and vue-demi won't help so much here. |
Happy to see vue3 support has been prioritized, it is much needed ! |
Please add vue 3 support 😫 |
We are working on it @lukamo1996! If you want to help out, you can try the feat/vue3-compat branch (#990) |
Can't wait <3 I'm a noob, I would just cause a mess |
Hello, yes, waiting for vue3 support. |
Hello everyone here, And I'd appreciate if you show your enthusiasm as reaction to this issue, instead of a comment because new comments send notifications to everyone watching this issue. Let's minimize unnecessary notifications for everyone. I'm also excited with this topic. We'll keep you updated. Feel free to ask questions or suggest anything related to Vue 3 support here. |
Hey Hey Algolia team, not another whine about hey when is the Vue3 support here! But rather a question if you could tag the vue-compat branch as beta, or make it more easily installable through npm to test in deploys. Thanks! |
Hey @michtio that's actually a good idea. So far, we've been keeping all the PRs under this milestone. And this is an umbrella PR where all the Vue 3 support related PRs get merged into. If you go to the PR, I've added some description on how to try the temporary version on your project. Let us know how it goes. I appreciate all of your interest and tests! |
@eunjae-lee going to start in the coming weeks on an Algolia integration where Vue3 ( no SSR ) is min. requirement. Will sure keep short tabs on it, and will file any issues along the way :) |
@michtio Thanks for the test. Looking forward to hearing from you! |
@eunjae-lee doesn't seem that I can import components through tree-shaking:
Results in:
Is there anything else to take into consideration? This error even comes from the vue-demi library:
|
In my honest opinion, I think it's not bad to have a seperate branch/feature release ( e.g. v2 vs v3 branch ) or release a vue-instantsearch 4.0.0 which is a major release which supports vue3, it is breaking and will be flagged. for Vue2 just support bugfixes and security issues, for future development and new features go the Vue3 route, you can still release on the v3 branches. All major packages do it this way, dev-server also stops supporting webpack4 and goes webpack5, we kind of have to live with the fact that software is moving rapidly, the current package is very stable for vue2, but could move forward towards vue3 now. I wouldn't mind helping contributing in this, maintaining and/or consulting if needed. with my current tests, I don't think vue-demi suffices for having support here, since it is throwing errors at us in a webpack5 modern buildchain which uses typescript. |
Hello @michtio By the way this is a working example that I have.
I'd love to, but the thing is considering the adaption we still need to support vue 2. Not just security fixes, but whenever we develop new widget or new feature, we need to do it for both versions, which will make the maintenance hard. And we forked It should start with import * as Vue from 'vue'
var isVue2 = false
var isVue3 = true
var Vue2 = undefined I think in your case it's (wrongly) this: import Vue from 'vue'
var isVue2 = true
var isVue3 = false
var Vue2 = Vue
var version = Vue.version If that's the case, if you run |
Thanks to @Haroenv I think we have a good way to remove vue-demi and still make it work. I'll work on it probably today or tomorrow. When it's done, it will be merged to this umbrella PR. Watch the PR if interested :) |
I can confirm I had the wrong version 👍 Looking forward to the other adaptation. Currently went with the route of creating our own vue components based on the bare JS packages, which will be a better fit at this stage for us. On the other hand, it is okay if you don't develop new features/widgets for older software anymore, if people want to use legacy software / packages, it's their responsibility to update it on projects, kind of how the ecosystem works. It shouldn't hold you guys back from using better/more modern technology. You might miss out a lot on performance with all the new Vue3 features. |
Hello @michtio, we've just merged the fix in the branch. So you can try it again.
Can you explain a bit more about this? Was it because of the issue with vue-demi? or another reason?
I'm not sure where you get it. The Vue 3 version of Vue InstantSearch will use Vue 3 APIs, so theoretically it shouldn't be a problem. |
@eunjae-lee , because of the hybrid vue2/vue3 approach mainly, it does clutter up the entire build process, with code we prefer not to have in there for government projects. Because it is yet another package. Also missing out on performance you can't implement Vue3 performance fully, since it's not able to use the composition API out of the box plus you couldn't use |
@michtio, those items aren't relevant for Vue InstantSearch, as it doesn't define components directly, that's done by the user's code, and the composition API is still possible to use via @vue/composition-api for v2, we just haven't had the need, as there's very little state handling part of Vue InstantSearch itself. Of course rewriting is an option, but this doubles or long-term support load, and is not a compromise we will be making. Good luck with your version of Vue InstantSearch of course, there's many possible implementations, and if you have very specific needs, it totally makes sense to take the bare minimum of code! |
Hello everyone, Examples are here:
There is an issue with this version. Even though you don't use SSR, it crashes if you don't have If you're interested in SSR, there are two examples in this repo: You can read more information about this release. |
As |
We might look into it @haoyun, maybe just writing definitions. Up to vue 3 typescript usage in vue was very painful, which is why we didn't try it yet |
Hello everyone subscribing this issue, Vue InstantSearch v4.0.0 has been released and now it supports Vue 3 🎉 import InstantSearch from 'vue-instantsearch'; // Vue 2
import InstantSearch from 'vue-instantsearch/vue3/es'; // Vue 3 It has a few breaking changes that you can easily migrate. You can read the upgrade guide. You can try these examples:
Let us know how it works for you, and feel free to create issues if you have any. |
The codesandbox link is broken(404) |
fixed now @lukamo1996, the |
now, status code 500 |
Updated, %20 apparently needed to be + in the url @superdiazzz |
Waiting for vue 3 support. |
Vue 3 support has been released 3 months ago ... See https://github.com/algolia/vue-instantsearch/releases/tag/v4.0.0 |
Bug 🐞
What is the current behavior?
The instantsearch Component for Vue does not work when I upgrade my website to Vue3, which is the current version of Vue
What is the expected behavior?
Vue Instantsearch should work with the latest version of Vue
Does this happen only in specific situations?
No. This will not work with any vue3 installation
What is the proposed solution?
Rewrite or branch the code to provide Vue3 support
What is the version you are using?
Latest
The text was updated successfully, but these errors were encountered: