1 month ago

What is the use of defer in the app.js

Posted 1 month ago by ehabafia

Hello, Laravel community.

I am trying to use select2.js library but for some reason, it refuses to work.

After allot of tries I just moved the word defer from the link of the app.js, it worked just fine.

    <script src="{{ mix('js/app.js') }}" defer></script>
this worked
    <script src="{{ mix('js/app.js') }}"></script>

My question what would the defer will do? and would that affect the Vue components that I have in my app?

Thank you,

Please sign in or create an account to participate in this conversation.