score:-1

i was facing this issue and it got resolved just by following the steps:

  1. if you are trying to open the html directly without any web server then useeffect won't be called.

  2. only way to solve this issue is by running a webserver and serve the html from the server.

i am using a mac system so run the python server using the command inside the public folder:

python -m simplehttpserver 8000

then open it using localhost:8000

score:0

i think what is happening is that the gsap library is getting tree shaken out of the production build. i would either try adjusting your webpack settings to make sure that it is not removed, or include it like this instead:

const gsap = require("gsap")

which in my experience has prevented libraries from being tree shaken out.


Related Query

More Query from same tag