Load js/app.js on <head>

Hi,

I am trying to having WordPress to enqueue scripts/app.js on <head> to avoid warnings from my scripts. Any suggestions on how to achieve set the enqueue in_footer param to false just for this file?

Thanks!

You should be able to do this in app/setup.php:

add_action('wp_enqueue_scripts', function () {
    bundle('app')->enqueueCss()->enqueueJs(false);
}, 100);
1 Like