I have tried to enqueue animejs to the theme, but I am not getting anywhere. I have tried both with npm install and bower install. I am not able to import anime from 'animejs' to the site, I do not want to use the manual option to add the script in the header or footer.php.
Could someone please help me solve this enqueue problem, I have added the overrides to my bower.jason
this also does not work, I have also tried to create a “vendor” folder in my assets directory and call the scripts in the main.js file, that too does not work.
My final aim is to enqueue the js file to my main.js and not have a seprate js file added.
Install Bower packages with bower install --save package-name. Using the --save flag will add the package into your project’s bower.json dependencies.
I think it’s more than just bower install, in the documentation it says after bower install we have to import the animejs
import anime from 'animejs'
If I manually link my js file in the footer <script src="anime.min.js"></script> I do not get an error and the animation works, but that not how I want to enqueue my scripts.