question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

asyncing JS is an important part of performance (defer too). I’d love to be able to specify that a final asset should be async or defer (or both).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
Mode54commented, Jul 17, 2016

Here’s the solution if anyone stumbles across this…

Add any extra parameters you want to include in the output tag right into the build:js comment:

  <!-- build:js /js/foo.js defer -->
  <script type="text/javascript" src="scripts/three.js"></script> 
  <script type="text/javascript" src="scripts/four.js"></script> 
  <!-- endbuild -->

useref repo --> https://github.com/jonkemp/useref

0reactions
Snugugcommented, Jul 24, 2015

Oh wow! I didn’t realize I was on the Gulp repo! Sorry about that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML script async Attribute - W3Schools
The async attribute is a boolean attribute. If the async attribute is set, the script is downloaded in parallel to parsing the page,...
Read more >
Scripts: async, defer - The Modern JavaScript Tutorial
The async attribute is somewhat like defer . It also makes the script non-blocking. But it has important differences in the behavior. The...
Read more >
Async scripts for asm.js - Game development - MDN Web Docs
In Gecko, async compilation allows the JavaScript engine to compile the asm.js off the main thread when the game is loading and cache...
Read more >
async attribute for external scripts | Can I use... Support tables ...
The boolean async attribute on script elements allows the external JavaScript file to run when it's available, without delaying page load first. Usage...
Read more >
Scripts: async, defer - W3docs
The async scripts are not waited for by the page: the content is processed and presented. · DOMContentLoaded and the async scripts don't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found