diff --git a/addStyles.js b/addStyles.js index af770cd0..4dc34958 100644 --- a/addStyles.js +++ b/addStyles.js @@ -98,6 +98,10 @@ function addStylesToDom(styles, options) { stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } + setTimeout(()=>{ + // styles printed, it's safe to show the document + document.documentElement.style.opacity = 1 + }) } function listToStyles(list) { diff --git a/index.js b/index.js index ab30bbea..fbd79258 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,8 @@ module.exports.pitch = function(remainingRequest) { return [ "// style-loader: Adds some css to the DOM by adding a