Today, I added anime js as a dependency to my package.json file. The version 3.0.1 is visible in the dependencies list.
I used npm to install it.
Next step was creating a folder and a JavaScript file in the public directory. I set up a simple event listener on a div element that is not directly associated with anime js. Surprisingly, this setup worked well because I also referenced the script in my ejs file.
However, whenever I try to write an animation, I encounter either an anime reference error or bodymovin related issues.
Could someone please guide me on how to properly import/require animeJS and bodymovin so that I can use them in the desired files? Any best practices for this scenario?
Just to reiterate, I created a folder and JavaScript file in the public directory, along with setting up a basic event listener on a div unrelated to anime js. Again, this setup successfully works due to proper scripting references in my ejs file.