cpreston321 / nuxt-swiper

Swiper.js for Nuxt
https://www.npmjs.com/package/nuxt-swiper
MIT License
220 stars 10 forks source link

Nuxt-swiper 2.0.0 not working in nuxt version 3.9.0 #115

Closed jony1993 closed 9 months ago

jony1993 commented 9 months ago

Bug

I get following warning, even when adding swiper- to compilerOptions.isCustomElement. Seems to be related to new nuxt version 3.9.0

Failed to resolve component: swiper-slide
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

When trying to build it for production (ssr) swiper is not working at all.

Version:

nuxt: 3.9.0 nuxt-swiper: 2.0.0

Reproduction:

https://stackblitz.com/edit/github-gzumnc?file=app.vue

cpreston321 commented 9 months ago

I will take a look today, I will let you know what I find!

Thanks for reporting the bug @jony1993

youkei-zzz commented 9 months ago

I met this problem

jony1993 commented 9 months ago

@cpreston321 Have you found out anything so far? :)

A made a better reproduction, since its hard to test on stackblitz:

Working without vue 3.4.3 https://github.com/jony1993/nuxt-template-or-render-function-missing/tree/without-vue-3.4.3

Not working with vue 3.4.3 https://github.com/jony1993/nuxt-template-or-render-function-missing/tree/main

jony1993 commented 9 months ago

Seems to be gone in [v3.4.5](https://github.com/vuejs/core/releases/tag/v3.4.5)

cpreston321 commented 9 months ago

@jony1993 Thanks for the validation.. I was kinda stumped at first. I test this before the upgrade to Vue 3.4 and it was working fine. I tested 3.4 it the other day with different Web component implementations and got the same error. So I assumed something changed upstream to cause this from happening. I'm glad it's resolved in the latest 3.4.5 👍🏼

cpreston321 commented 9 months ago

It looks like it was an upstream bug that fixed in 3.4.4

Commit

image
jony1993 commented 9 months ago

@cpreston321 Closing this now :) Thanks for your help...