Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using with Nuxt #1

Open
Clex1o1 opened this issue Jun 27, 2019 · 7 comments
Open

Problems using with Nuxt #1

Clex1o1 opened this issue Jun 27, 2019 · 7 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Clex1o1
Copy link

Clex1o1 commented Jun 27, 2019

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.

@angelomelonas
Copy link
Owner

angelomelonas commented Jun 27, 2019

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 angelomelonas added bug Something isn't working good first issue Good for newcomers labels Jun 27, 2019
@csoalhat
Copy link

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

@angelomelonas
Copy link
Owner

angelomelonas commented Sep 13, 2019

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.

@AeonFr
Copy link
Contributor

AeonFr commented Dec 2, 2019

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

@AeonFr
Copy link
Contributor

AeonFr commented Dec 5, 2019

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.

@CarlosWosiak
Copy link

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

@kirillkushpel
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants