vue-scroll-snap icon indicating copy to clipboard operation
vue-scroll-snap copied to clipboard

Problems using with Nuxt

Open Clex1o1 opened this issue 5 years ago • 7 comments

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.

Clex1o1 avatar Jun 27 '19 08:06 Clex1o1

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?

angelomelonas avatar Jun 27 '19 09:06 angelomelonas

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 :(

csoalhat avatar Sep 13 '19 12:09 csoalhat

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.

angelomelonas avatar Sep 13 '19 13:09 angelomelonas

I'm using vue-scroll-snap in nuxt (create-nuxt-app using a SPA) and don't seem to have any issue.

AeonFr avatar Dec 02 '19 17:12 AeonFr

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.

AeonFr avatar Dec 05 '19 14:12 AeonFr

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:

CarlosWosiak avatar Nov 26 '20 23:11 CarlosWosiak

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...

kirillkushpel avatar Feb 11 '21 08:02 kirillkushpel