Open Clex1o1 opened 5 years ago
Hi @Clex1o1. I am sorry to hear you are experiencing issues with this plugin within your Nuxt project. Unfortunately, I have never used Nuxt before, so I have no clue how to go about solving your issue. Perhaps you can point me to the project where you are experiencing the issue and I can have a look?
Hey, have any of you found a solution for this problem? Or an alternative? I am trying to use your plugin as well with Nuxt but i'm running into the same error :(
Hi @csoalhat, I have, unfortunately, not yet had time to work on this issue. Like I told @Clex1o1, if you are interested in attempting to implement vue-scroll-snap for Nuxt, you are more than welcome. I will try and assist if you do.
I'm using vue-scroll-snap in nuxt (create-nuxt-app
using a SPA
) and don't seem to have any issue.
Following on this issue:
Some configurations from create-nuxt-app
include purgeCSS
. The plug-in doesn't detect classes dynamically loaded, and, apparently, it doesn't detect classes loaded using plug-ins either.
Either way, if the npm run generate
or npm run build
command outputs a style-less scroll container, this might be the fix:
Add this lines to your nuxt.config.js
//...
purgeCSS: {
whitelist: [
'scroll-snap-container',
'fullscreen',
'horizontal',
]
//...
Note, this is not related to the original issue, just thought it might be useful for someone so I'm putting it for future reference.
I 'solved' by copying the content from src/VueScrollSnap.vue
and making a component from it in my own project.
I may miss some future update, but it is better than being unable to use it because I use Nuxt. :thinking:
I 'solved' by copying the content from
src/VueScrollSnap.vue
and making a component from it in my own project.I may miss some future update, but it is better than being unable to use it because I use Nuxt.
Same story. I've ported my 'clone' to TS, works ok. Strange bug though...
Hey, I have a problem using your plugin inside my Nuxt project.
Unexpected token <
Sadly, I do not have more information about the error, at the moment.