AppAsset Load javascript files async

Hi folks,

Using AppAsset how can I get my javscript files to load async?

I can put this is js options but it isn’t the correct script attribute:




$jsOptions = [

   'async' => 'true',

];


<script src="some/script/url.js" async="true"></script>



Where as what I’m after is output of


<script src="some/script/url.js" async></script>

Thanks in advance

Ash

you most add it in AppAsset file:

public $jsOptions = [
‘defer’ => ‘defer’,
];