nuxt-modules / algolia

🔎 Algolia module for Nuxt
https://algolia.nuxtjs.org/
MIT License
191 stars 35 forks source link

[Bug[ Vue-Instantsearch does not work for nuxt 3 project #61

Closed Baroshem closed 2 years ago

Baroshem commented 2 years ago
image

It is caused by the usage of the plugin. There must be some inconsitencies in how the plugin works with vue 3, vite and nuxt. As we are importing the components separately recently, I think it would be safe to remove this line from plugin.ts:

  if (instantSearch) {
    const { plugin } = await import("vue-instantsearch/vue3/es/src/plugin");
    nuxtApp.vueApp.use(plugin);
  }

Tested on both local nuxt project from the module and completely new project with nuxt 3.

Version

@nuxtjs/algolia: nuxt:

Reproduction Link

Steps to reproduce

What is Expected?

What is actually happening?