hypernym-studio / nuxt-gsap

GSAP module for Nuxt.
MIT License
290 stars 12 forks source link

Extra plugin not found on production #13

Closed silverhand7 closed 3 years ago

silverhand7 commented 3 years ago

Hi, thanks for developing this Nuxtjs library to integrate with GSAP easily. But I have an issue when I tried to use the extra plugin such as scrollTrigger, It was working perfectly on the dev environment, after I start to build and run on the production, the plugin was not discovered. See the screenshot below for the warning message.

image

Any ideas what should I do to fix this? Because most of the animations are using scrollTrigger.

Thanks.

ivodolenc commented 3 years ago

Hi, thanks for your interest in this module.

I just tested ScrollTrigger extra plugin and it works fine in dev & prod mode.

Unfortunately, it's difficult to say where the problem is without minimal reproduction. Please share an example (link to the code) that shows the issue.

silverhand7 commented 3 years ago

Hi @ivodolenc Thanks for the reply. Here's the link to my recent project https://github.com/refojunior/valotricks-nuxt I have configured everything following the docs, and it was run fine on dev, But I don't know why after I build with npm run build and run it with npm run start it the scrollTrigger plugin is not discovered. Also, I tried to deploy to production and it's not working.

Other than that, I tried to reinstall this library and run npm install, npm run generate, etc. but nothing's work.

ivodolenc commented 3 years ago

@refojunior Thanks for the link and sorry if I wasn’t completely clear, but please create a minimal reproduction without styling or third-party code (only the code that relates to your problem, not the entire project).

TIP: Start a new project with create-nuxt-app, then add nuxt-gsap-module and play with the code to see where is the issue. If you find a problem, feel free to share it here.

silverhand7 commented 3 years ago

Hello @ivodolenc I found the issue, it is because I forgot that I was tried to load the gsap through the CDN on my layout. image After I removed it, everything works both local and production. Thanks for the response! Cheers!

ivodolenc commented 3 years ago

Np 👍 Cheers!