From f27ace3130340b9b3ca2c452d9973a5b685c207a Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Sun, 30 Sep 2018 16:25:12 -0400 Subject: [PATCH] Make less use async mode in the browser This makes less use async mode in the browser. We were already doing this for our less requests, but now we also set it before less executes, otherwise it tries to do some weird display: none stuff. Fixes https://github.com/donejs/donejs/issues/1113 --- less-engine.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/less-engine.js b/less-engine.js index 16dd406..cc2b5e1 100644 --- a/less-engine.js +++ b/less-engine.js @@ -1 +1,5 @@ +// Without these options Less will inject a `body { display: none !important; }` +var less = window.less || (window.less = {}); +less.async = true; + module.exports = require("less/dist/less");