U3F1ZWV6ZTc5OTgzNDMxMzE1MzJfRnJlZTUwNDYwNDY0NzA3Nzc=

Compiling and initializing external JS library in Laravel mix

Compiling and initializing external JS library in Laravel mix

Question :
I am utilizing Laravel blend to gather every one of my advantages, yet I'm experiencing difficulty introducing an outer library. 

I have utilized npm introduce aos - spare to get the reliance, and inside my app.js I am calling it like this: 
require('aos/dist/aos'); 

AOS.init();

Solution:
From version 2.0.0 attributes aos are no longer supported, always use data-aos.

 Setup

Install AOS

  • Using bower
      bower install aos --save
  • Using npm
      npm install aos --save

Link styles

  <link rel="stylesheet" href="bower_components/aos/dist/aos.css" />

Add scripts

  <script src="bower_components/aos/dist/aos.js"></script> 
AOS from version 1.2.0 is available as UMD module, so you can use it as AMD, Global, Node or ES6 module.

Init AOS

  <script>
    AOS.init();
  </script>
if you want to improve the solution,
comment with your solution to help the community
Comments
No comments
Post a Comment

Post a Comment

NameEmailMessage